JSON Schema Toolkit
v0.22.0Deterministic JSON Schema tools: validate, lint, diff with a compatibility verdict, bundle, infer.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
jsonschema_validate
Validate a JSON, YAML, JSONL or TOML data file against a JSON Schema and return the errors with their line numbers. Use this instead of judging validity by reading the documents.
| Parameter | Type | Description |
|---|---|---|
dataFile * | string | Path to the data file to validate. |
schemaFile * | string | Path to the JSON Schema to validate against. |
jsonschema_lint
Report schema-quality findings for a JSON Schema file: unknown keywords, missing descriptions, duplicate enum values, examples and defaults that contradict their own subschema.
| Parameter | Type | Description |
|---|---|---|
schemaFile * | string | Path to the JSON Schema to lint. |
jsonschema_diff
Compare two versions of a JSON Schema and return a backward-compatibility verdict plus every classified change. Use this to decide whether a schema change is breaking — do not infer it from the diff text.
| Parameter | Type | Description |
|---|---|---|
newSchemaFile * | string | Path to the proposed (newer) schema. |
oldSchemaFile * | string | Path to the baseline (older) schema. |
strict | boolean | Also treat changes the classifier cannot prove safe as blocking. |
jsonschema_bundle
Flatten a multi-file schema into one self-contained document, either bundling external refs into $defs or dereferencing them inline.
| Parameter | Type | Description |
|---|---|---|
schemaFile * | string | Path to the root schema. |
dereference | boolean | Inline ref targets instead of collecting them into $defs. |
jsonschema_infer
Infer a JSON Schema from an existing data file (JSON, JSONC, JSONL, YAML or TOML). Use this to bootstrap a schema from real documents.
| Parameter | Type | Description |
|---|---|---|
dataFile * | string | Path to the data file to infer from. |
draft | string | Target draft (default 2020-12). |
jsonschema_sample
Generate a valid example instance from a JSON Schema. The output is validated against the schema before being returned.
| Parameter | Type | Description |
|---|---|---|
schemaFile * | string | Path to the JSON Schema. |
jsonschema_coverage
Report which properties a schema declares that the given data files never exercise — the unused-in-data surface of a contract.
| Parameter | Type | Description |
|---|---|---|
dataFiles * | array | One or more data files to measure coverage from. |
schemaFile * | string | Path to the JSON Schema. |
jsonschema_test
Run declarative schema test suites (*.schema.test.json), which pin the documents a schema must accept and must reject. Use this to check a schema change against its contract.
| Parameter | Type | Description |
|---|---|---|
suiteFiles * | array | One or more *.schema.test.json suite files. |