Architectural Decision Records (ADRs)
This section documents the architectural decisions for the JSON Schema specification. ADRs provide context about why certain design choices were made and help maintain consistency as the project evolves.What are ADRs?
Architectural Decision Records (ADRs) are documents that capture important architectural decisions made along with their context and consequences. Each ADR describes:- The context and problem being addressed
- The decision drivers that influenced the choice
- The options that were considered
- The final decision and its rationale
- The positive and negative consequences
Key Decisions
Below are the major architectural decisions that have shaped JSON Schema:Process and Governance
-
Decoupling from IETF (September 2022)
- Decision to decouple from IETF standards process and develop an independent specification development lifecycle
- Enables greater flexibility in versioning and evolution while maintaining production readiness
-
Stable Specification Process (November 2022)
- Adoption of a TC39-inspired stability model with mutable specifications
- Features progress through stability levels before becoming stable with compatibility guarantees
- Annual releases with year-based versioning (e.g., 2024)
Feature Decisions
-
Single-Value Annotations (SVA) Prefix (April 2023)
- Introduction of the
x-prefix convention for custom annotation keywords - Provides a way to include custom data in schemas while maintaining stability guarantees
- Familiar pattern from other specifications (OpenAPI, HTTP headers)
- Introduction of the
-
Object Contains (November 2023)
- Decision to keep
containskeyword for arrays only - Reverted earlier decision to extend
containsto objects to avoid breaking changes - Future object-specific keywords may be introduced instead
- Decision to keep
-
Format as Assertion (November 2024, Proposed)
- Proposal to make
formatan assertion keyword by default instead of annotation-only - Aligns with user expectations that format values should be validated
- Requires implementations to support standard format values or refuse unknown formats
- Proposal to make
Impact on JSON Schema
These architectural decisions have fundamentally shaped JSON Schema’s direction:- Stability First: The move to a stable specification model means schemas written today will continue to work with future versions without modification.
- Independent Evolution: Decoupling from IETF allows JSON Schema to evolve at its own pace while maintaining production readiness.
-
Clear Extension Points: The
x-prefix and other mechanisms provide clear ways to extend schemas without conflicting with future standard keywords. -
User-Centric Design: Decisions like making
formatan assertion reflect responsiveness to community feedback and actual usage patterns.