JSON Schema Breaking Changes Checker
Compare released and proposed JSON Schemas to find contract-breaking validation and reference changes before clients or stored data are affected.{{ summaryHeading }} {{ summaryPrimary }} {{ summaryLine }} {{ badge.label }} {{ badge.value }}
| Severity | Change | JSON Pointer | Released | Proposed | Release action | Copy |
|---|---|---|---|---|---|---|
| {{ severityLabel(row.severity) }} | {{ row.change }} | {{ row.pointer }} | {{ row.released }} | {{ row.proposed }} | {{ row.action }} | |
| No compatibility signals were found in the selected heuristic coverage. Validate representative old instances before release. | ||||||
| Review area | Current value | Evidence | Next action | Copy |
|---|---|---|---|---|
| {{ row.area }} | {{ row.value }} | {{ row.evidence }} | {{ row.action }} |
A published JSON Schema becomes a promise about which JSON values a system will accept. Once producers, stored documents, generated clients, or downstream services rely on that promise, tightening the schema can reject data that was valid under the released contract.
Compatibility is therefore about accepted instance sets, not the number of changed lines. Adding a required property, removing an enum value, narrowing a type, raising a minimum, lowering a maximum, or closing an object can all reduce the accepted set. Relaxing a schema widens that set, which avoids rejecting old data but may still surprise code that assumes a fixed group of values or fields.
| Change | Likely effect | What to verify |
|---|---|---|
| New required property | Older objects without the property fail | Existing producers and stored records |
| Removed type or enum value | Previously accepted values fail | Payload samples and generated clients |
| Tighter numeric, length, or array bound | Values near the old boundary fail | Exact boundary cases in production data |
| Closed object or array | Extension fields or extra items fail | Forward-compatible producers and vendor data |
| Relaxed rule | More values pass validation | Downstream code that may reject the wider shape |
Some differences resist a purely structural answer. Composition keywords such as oneOf, not, and conditional schemas can change acceptance in ways that require real instances. Remote references may hide decisive rules, and format enforcement varies by validator configuration. Annotation changes can alter documentation or code generation without changing validation.
Backward compatibility also depends on direction. This review asks whether values accepted by the released schema remain accepted by the proposed schema. It does not prove that every new value will be understood by old consumers, nor does it prove semantic compatibility in business rules that JSON Schema cannot express.
A reliable release gate combines a structural comparison with representative old payloads, the same schema draft and validator used in production, fully resolved dependencies, and a versioning plan for intentionally breaking changes.
How to Use This Tool:
Compare the contract already relied on in production with the exact candidate intended to replace it.
- Paste the published contract into Released schema and the candidate into Proposed schema. Correct JSON syntax errors before reading compatibility findings.
- Use Contract-strict release review for a release gate. The lighter API and structure profiles deliberately omit some constraint or closure checks.
- Resolve local
$refpointers for normal reviews. Choose opaque handling only when reference strings themselves are the object of comparison. - Review critical, high, and medium findings as breaking signals, then inspect low and informational rows for coverage or downstream-client effects.
- Validate representative released instances with the production validator before approving the change.
Interpreting Results:
Breaking signals detected means at least one critical, high, or medium heuristic matched. It is a release warning, not a formal proof that every old instance fails. No breaking signals detected means the selected structural rules found none; unexpanded references, composition semantics, validator options, and business meaning can still matter.
Pay particular attention to coverage warnings. An opaque, remote, unresolved, circular, or depth-limited branch is a reason to test real instances rather than treating the summary as complete.
Technical Details:
The comparison walks corresponding schema locations using JSON Pointer paths. Local references can be dereferenced into their target shapes; remote references are never fetched. Findings are deduplicated, then sorted by severity, pointer, and change label.
Rule Core
| Rule family | Breaking direction | Severity used |
|---|---|---|
| Types | Accepted type removed or replaced | High or critical |
| Required properties | Property becomes required | Critical |
| Properties and enums | Defined property or accepted value removed | High or critical |
| Bounds and constraints | Minimum rises, maximum falls, or a new restriction appears | Medium or high |
| Closure | Additional or unevaluated content becomes restricted | High |
| Composition | allOf, anyOf, oneOf, not, conditionals, or dependent schemas change | Medium, with instance testing required |
Critical, high, and medium rows contribute to the breaking count. Low rows report coverage limits, and informational rows describe widening, relaxation, or optional annotation changes. The structure-only profile still checks required and property removal rules, but skips enums, constraints, closure, and composition. API surface review adds enums and composition; strict review enables every rule family.
Reference and comparison limits
Only fragment references beginning with # can be resolved. Circular references are not expanded repeatedly, and recursion stops after 48 levels. Each schema is limited to 250,000 characters; the visible finding limit of 50 to 500 changes rendering only, not the computed totals.
Privacy and Accuracy Notes:
Both schemas are parsed and compared in the browser. Remote references are not downloaded. Keep proprietary examples and secrets out of schema annotations before sharing reports, and treat the result as a heuristic until representative instances pass the production validator.
Worked Examples:
Required currency field
A released order accepts objects without currency. Adding currency to required produces a critical finding because every older order that omits it becomes invalid. A safer sequence introduces the field as optional, migrates producers and stored data, then requires it in a breaking contract version.
Wider plan enum
Changing ["starter", "team"] to include "enterprise" widens validation and appears as informational rather than breaking. Strict client switch statements can still fail on the new value, so consumer testing remains necessary.
References:
- JSON Schema Draft 2020-12 Core Specification, JSON Schema, 16 June 2022.
- JSON Schema Draft 2020-12 Validation Vocabulary, JSON Schema, 16 June 2022.
- RFC 6901, JavaScript Object Notation Pointer, RFC Editor, April 2013.