Glossary · Protocols & Standards

JSON Schema

A vocabulary for annotating and validating JSON documents, used by Naftiko to validate capability specs and enforce contract correctness.

What is JSON Schema?

JSON Schema is a declarative language for annotating and validating the structure of JSON documents. It defines expected types, required fields, value constraints, and documentation for any JSON-based format.

JSON Schema in Naftiko

JSON Schema is foundational to Naftiko’s approach:

  • Spec validation – Every capability spec is validated against a JSON Schema definition, catching errors at authoring time.
  • Contract enforcement – Input and output parameter schemas ensure type safety between capabilities and their consumers.
  • IDE support – The VS Code extension uses JSON Schema to provide IntelliSense, autocompletion, and inline diagnostics for capability YAML files.
  • Governance rules – Governance policies are themselves validated by JSON Schema, ensuring policy definitions are correct.

Why it matters

JSON Schema provides machine-checkable contracts at every layer of the capability lifecycle. This eliminates entire categories of runtime errors by catching them at design time, and enables tooling that makes correct-by-construction the default.

Browse all terms