What is JSON Schema?
JSON Schema is a vocabulary that allows you to annotate and validate the structure of JSON documents. A JSON Schema document describes what fields an object may contain, their types, constraints (minimum, maximum, pattern, enum), and which fields are required — enabling automatic validation, documentation generation, and UI generation from a single source of truth.
A JSON Schema is itself a JSON document. The most current stable version is Draft 2020-12, which aligns with the JSON Schema standard referenced by OpenAPI 3.1. Key keywords include: type (string, number, integer, boolean, array, object, null), properties (sub-schemas for object keys), required (list of mandatory keys), items (sub-schema for array elements), minimum/maximum (numeric bounds), minLength/maxLength (string length bounds), pattern (regex constraint), and enum (allowed values).
JSON Schema has become the lingua franca for API contract definition. OpenAPI 3.1 uses JSON Schema directly for request and response bodies, meaning any tool that understands JSON Schema can validate OpenAPI-described payloads. Zod (TypeScript), Pydantic (Python), and Ajv (JavaScript) are popular libraries that validate JSON at runtime against a schema.
Beyond validation, JSON Schema drives form generation (React JSON Schema Form, Formik), API documentation (Redoc, Swagger UI), mock data generation (Faker.js, Mockoon), and test case generation. A well-authored schema simultaneously serves as machine-executable spec, human-readable documentation, and runtime guard.
quickhelp.dev tools define all input and output types as Zod schemas, which are automatically compiled to JSON Schema. These JSON Schemas appear in the /openapi.json spec, in MCP tool descriptors, and in the form UI on each tool page — one schema, four surfaces.