Documentation
¶
Overview ¶
Package schema generates the JSON Schema (draft 2020-12) document for the wire shapes of the Brigade Adapter Protocol v1 (plan 7.3): one document with a $defs entry per protocol type, reflected from the Go structs of internal/protocol with invopop/jsonschema and then patched where reflection cannot see the protocol's rules — the C-23 forbidden SendRequest members become `false` property schemas, pointer-typed members become nullable, and the 4.4.1 code-point caps become maxLength.
This package and its reflection dependency are DEV-ONLY: they are linked into cmd/brigade-schema (never shipped) and into tests, never into bin/brigade — `make deps-check` asserts the shipped binary's module set. Nothing under internal/protocol proper may import this package.
The generated document is committed as docs/protocol-v1.schema.json (`make schema`) and drift-checked in CI (`make schema-check`), so Document must be byte-stable: $defs is assembled in sorted-name order and every schema object marshals its members in a deterministic order (struct fields in declaration order, Go maps in sorted-key order).
Index ¶
Constants ¶
const SchemaID = "https://raw.githubusercontent.com/appshapes/brigade/master/docs/protocol-v1.schema.json"
SchemaID is the canonical location of the committed document.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.