AGPL-3.0-or-later · forever.

the standard library

nika:validate

Validate data against a JSON Schema · returns {valid, errors} (invalid data is a report, not a failure). One of 28 builtins in the closed nika: namespace.

the data familypure JSON/data transforms, no I/O

  • datafamily9 tools
  • 3argsdeclared contract
  • 2requiredcheck teaches a miss
  • craftedusage filecheck-green below

the contract

3 args · 2 required

A missing required arg is a nika check finding before anything runs; the vocabulary below comes from the binary itself (nika catalog --tools --json), not from prose.

data*
the value (or a YAML string with format: yaml)
schema*
a JSON Schema
format
stringjson (default) | yaml

in a real file

a complete workflow
validate.nika.yaml
nika: v1workflow:  id: gate-the-payload  description: "a schema verdict as data — invalid input is a report, not a crash"tasks:  verdict:    invoke:      tool: "nika:validate"      args:        data: { name: "nika", verbs: 4 }        schema:          type: object          required: [name, verbs]          properties:            name: { type: string }            verbs: { type: integer }  gate:    on_error:      fail_workflow: true    with:      verdict_valid: ${{ tasks.verdict.output.valid }}    invoke:      tool: "nika:assert"      args:        condition: ${{ with.verdict_valid }}        message: "payload failed its schema"

a complete file, nika check green; the drift gate re-validates this copy against the schema on every test run. open it in the playground →

cross-references

ships in skeletons

no skeleton ships it; the crafted file above is the reference.

the check gates

the data family

9 tools

pure JSON/data transforms, no I/O.

Machines read the same vocabulary at /tools/catalog.json; the contract lives in spec 06 · stdlib. Install and ask the binary itself: nika catalog --tools. Read the spec →