JSON Schema
A standard vocabulary for describing the allowed shape of JSON data: which fields exist, their types, which are required and what values are allowed.
In more detail
OpenAPI 3.1 uses JSON Schema to describe request and response bodies. Tools can validate messages against it, and a contract suite can turn its required members into checks.
Examples
{"type": "object", "properties": {"id": {"type": "integer"}}, "required": ["id"]}Schema registries accept JSON Schema alongside Avro and Protocol Buffers.Related terms
- OpenAPI — A standard, language-neutral format for describing an HTTP API: its paths, operations, parameters, request and response schemas, errors and security.
- OpenAPI components — The section of an OpenAPI document that holds reusable definitions, such as schemas, parameters and responses, referenced from operations.
- contract testing — Testing that an API’s real behaviour matches its written contract, and that its callers only rely on what the contract promises.
- nullability — Whether a field may hold null, an explicit no value, and how that differs from the field being absent.
- schema — A formal description of the structure of data: which fields or columns exist, their types and which are required.
- JSON — A simple text format for structured data made of keys, values, lists and nested objects.
- schema registry — A service that stores versioned schemas for Kafka data, gives each a numeric ID and checks new versions against compatibility rules.
- validation schema — A description of what valid data looks like, checked by code while the program runs so bad data is rejected at the door.
Taught in
- Structured Output — AI Engineering: LLM Apps, RAG & Agents
- Function Calling — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- OpenAPI And Design-First — Modern API Architecture: REST, GraphQL & gRPC
- Mocking Dependencies — Modern API Architecture: REST, GraphQL & gRPC
- Contract Testing — Modern API Architecture: REST, GraphQL & gRPC
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC
- The Field The Registry Refused — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Twelve Lines Instead Of Four Hundred — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- API Contract Architecture: OpenAPI 3.1 & Schema Truth — Production Full-Stack Engineering
- The Schema Registry — Apache Kafka & Event Streaming
- Compatibility Modes — Apache Kafka & Event Streaming
References
- JSON Schema
- OpenAPI Specification 3.1.0
- JSON Schema
- Understanding JSON Schema: object
- JSON Schema specification