Skip to main content

Module json_schema

Module json_schema 

Source
Expand description

JSON Schema generation for CLI output types.

This module provides schema generation for all commands that support –json output, plus the editor-facing generate-config.schema.json for the generate command’s YAML input (see generate_config_schema). Schemas are generated using the schemars crate and can be exported via the schema subcommand.

Functions§

all_schemas
Returns all JSON schemas for commands that support –json output. Uses BTreeMap for deterministic ordering (important for diffable output).
generate_config_schema
Build the editor-facing JSON Schema for the generate command’s kind: model / kind: overrides YAML configs.
get_schema
Generate a single schema by command name.