Print the JSON Schema (Draft 2020-12) that documents the structure of gaze analyze --format=json output. Useful for validating output programmatically or generating client types in other languages.
gaze schema [flags]
This command takes no positional arguments.
This command has no flags beyond the standard --help.
| Flag | Short | Type | Description |
|---|---|---|---|
--help |
-h |
bool |
Help for schema |
The command prints the complete JSON Schema to stdout. The schema is embedded in the Gaze binary at build time (from internal/report/schema.go).
The schema defines:
- Top-level object:
version(string) andresults(array ofAnalysisResult) - AnalysisResult:
target(function metadata),side_effects(array),metadata(timing/version) - SideEffect:
id,type(one of 37 effect types),tier(P0–P4),location,description,target, and optionalclassification - Classification:
label(contractual/incidental/ambiguous),confidence(0–100),signals(array),reasoning
See JSON Schemas for annotated field descriptions and example output.
gaze schema# Using ajv-cli (npm install -g ajv-cli)
gaze schema > /tmp/gaze-schema.json
gaze analyze ./internal/crap --format=json > /tmp/output.json
ajv validate -s /tmp/gaze-schema.json -d /tmp/output.json# Using json-schema-to-typescript (npm install -g json-schema-to-typescript)
gaze schema | json2ts > gaze-types.ts- JSON Schemas — annotated schema reference for all JSON-producing commands
gaze analyze— the command whose output this schema describes