Documentation
¶
Overview ¶
Package schema builds the machine-readable command and output schemas that `jira agent schema` emits and the docs generator reads. It walks the live cobra tree, so the published schema cannot drift from the real commands.
Index ¶
Constants ¶
const ContractVersion = "1.0.0"
ContractVersion is the semver of the agent-facing contract: the command tree, envelope, exit codes, and guide semantics published by `agent schema` (data.schema_version) and stamped on the full `agent guide` output. Bump major for a breaking change to the envelope, exit codes, or an existing flag/field; minor for additive surface (new command, flag, field, or guide section); patch for wording-only changes. Independent of the binary version — a release with no contract change keeps the same value.
Variables ¶
This section is empty.
Functions ¶
func OutputSchemaForCommand ¶ added in v0.6.4
OutputSchemaForCommand returns the registered JSON Schema for the `data` payload of cmd's response envelope, and whether a command-specific schema is registered. Commands without one return the standard envelope only, so the caller renders nothing rather than an empty shape.
It exposes the same registry that `jira schema` emits, so the docs generator can render an "Output fields" table from it. The table is generated, not hand-written, so it cannot drift from the real output.
func WriteSchema ¶
WriteSchema emits the CLI command schema. The envelope vs compact vs human output shape is decided by the resolved --output mode.
Types ¶
This section is empty.