ZON Schema

You won’t need to maintain a ZON schema when importing ZON files without a result type (will be available in 0.14.1), including for build.zig.zon, since package manifest’s schema isn’t meant to be maintained by the user.

If you still want to maintain a ZON schema for some src/data.zon in Zig source code as a file struct, then the solution could be a new zq feature.

For instance, to check your schema you’d run:

zq schema src/Data.zig src/data.zon
# or `zq` could automatically look for the zon file in the same path
zq schema src/Data.zig

Also, to update your schema you’d run:

zq schema --update src/Data.zig src/data.zon
# or `zq` could automatically look for the zon file in the same path
zq schema -u src/Data.zig