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

Taught in

References

Certification courses