schema

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 6 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

This section is empty.

Variables

This section is empty.

Functions

func DocentRegistry added in v0.14.0

func DocentRegistry() docent.SchemaRegistry

DocentRegistry bridges the host's schema knowledge into docent's registry form: the typed-Output-derived output schemas and the hand-written --json-input schemas, keyed by full command path ("jira issue create"). Registry keys with no matching command are ignored by Apply, so alias ops cost nothing.

func OutputContract added in v0.14.0

func OutputContract() map[string]any

OutputContract returns the tool-wide envelope and structured-error schemas — shapes that describe every response rather than one command, so they ride the docent schema root's extensions instead of a command node.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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