schema

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 9 Imported by: 0

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

View Source
const ContractVersion = "2.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

func OutputSchemaForCommand(cmd *cobra.Command) (map[string]any, bool)

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

func WriteSchema(cmd *cobra.Command) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL