Expand description
Typed code generation from Active schemas (C-047, spec/converters.md §7). Reads the module’s schema tree and emits JSON Schema, an OpenAPI fragment, TypeScript interfaces, Go structs, and Rust serde types. Only static literal constraints render — dynamic bounds still validate at runtime but have no static form (documented, never guessed).
Functions§
- schema_
to_ go - The schema tree as Go structs with
jsontags (nested tables become PascalCase structs; enums stay strings with their members documented). - schema_
to_ json_ schema - The schema tree as JSON Schema: objects for tables (closed →
additionalProperties: false), enums, arrays, constraints from static literals, static defaults, anddeprecatedflags. - schema_
to_ openapi - The JSON Schema wrapped as an OpenAPI 3.1
components.schemas.<name>fragment. - schema_
to_ rust - The schema tree as Rust serde types: structs with
renametags, real enums forEnum,Optionfor defaulted/Null fields. - schema_
to_ typescript - The schema tree as TypeScript
export interfacedeclarations (nested tables become PascalCase interfaces;?marks defaulted/Null fields).