Validate JSON data with schemas, types, required fields, formats, composition, and API contracts.
Lessons
Evolve schemas without breaking consumers.
Versioning Schemas is easiest to learn by reading the example, changing it, and observing the result.
{
"$id": "https://example.com/schemas/lesson/v2.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"slug": { "type": "string" },
"title": { "type": "string" },
"tags": { "type": "array", "items": { "type": "string" } }
}
}Practice the Versioning Schemas example in a small scratch file, then explain what changed and why.