-
[toml-schema] declares metadata such as the schema language version.
-
[elements] describes the expected document structure.
-
[types] defines reusable shapes.
-
collection supports dynamic table names.
-
oneof and anyof support alternative valid forms.
-
min, max, minlength, maxlength, allowedvalues, and pattern express practical constraints.
-
itemtype, arraytype, and items cover arrays, arrays of structured values, and positional arrays.
The goal of TOMLS chema is to make TOML files safer and easier to modify.
What is live now
The repository now includes:
- A human-readable specification in
SPEC.md.
- A formal ABNF companion grammar in
toml-schema.abnf.
- A self-schema in
toml-schema.tosd.
- A worked example pair:
config.tosd and config.toml.
- Reference implementations in Java, Go, and Rust.
- A GitHub Pages website at https://toml-schema.org.
The reference implementations share the same practical expectations: parse TOML using language-native TOML parsers, validate checked-in examples, support schema lookup through [toml-schema].location, validate the example schema against the self-schema, and keep vocabulary aligned with the ABNF and self-schema.
Where Coding Agents helped
To bring the project to the finish line, I relied on GitHub Copilot. Its role has been practical and implementation-focused:
- Generate and iterate on reference implementations.
- Add and refine tests across Java, Go, and Rust.
- Help build the GitHub Pages website.
- Help close a few issues and review findings.
- Assist with CI and documentation cleanup.
It is important to clarify that TOML Schema did not begin as an AI-generated concept, and most of the schema idea was not invented with AI. The project started in 2020 with the bulk of the specification written down and reviewed by members of the TOML project itself.
Try it
The new site is live at https://toml-schema.org.
The repository is at https://github.com/brunoborges/toml-schema.
If you work with TOML files, take a look at the specification, try the examples, and open an issue with feedback. The project is ready for people to kick the tires, compare it with real configuration files, and help shape what a TOML-native schema format should become.