Expand description
#2096: the JSON Schema for bynk.toml, generated from the manifest’s Rust
types.
The tables come from the crates that own them: [fmt] from bynk-fmt’s
RawFmt (the struct that reads it), the rest from
bynk_project::manifest_schema. The table list is
bynk_project::MANIFEST_TABLES and bynk_project::MANIFEST_MAP_TABLES,
the ones check_manifest_str refuses against, so a table added there without a schema fails generate, and the
test holds every table’s keys to it.
The schema is committed at SCHEMA_PATH, under the docs site’s public/
directory, so the site serves it at SCHEMA_URL. cargo xtask manifest-schema rewrites it; tests/manifest_schema.rs fails when it is
stale.
Constants§
- SCHEMA_
PATH - Where the schema is committed, relative to the repo root.
- SCHEMA_
URL - Where the docs site serves it: the schema’s
$id, the URL the VS Code extension associates withbynk.toml, and the one a#:schemadirective names.
Functions§
- generate
- The whole
bynk.tomlschema, keys sorted so the committed text is stable. - render
- The schema as committed: pretty-printed, with a trailing newline.
- write
- Write the schema to
SCHEMA_PATHunderroot.