Last updated:
Breaking Change Detector
This breaking change detector compares two versions of a JSON Schema or OpenAPI spec and sorts every difference into breaking changes, warnings, and safe modifications, by oasdiff's rules. Get remediation suggestions and generate release changelogs.
What this tool does
The most dangerous schema changes are the ones that pass every test you have. Your tests use the new schema, your handlers use the new schema, every locally observable thing uses the new schema, but your deployed clients are still on yesterday's contract. The Breaking Change Detector compares two versions of a JSON Schema or OpenAPI document and categorizes every difference into three buckets: changes that break existing clients (require a major version), changes that are safe for additive evolution (minor version), and warnings: changes that may break clients depending on values the spec can't show, such as a changed pattern.
Each diff entry comes with a precise location (which property of which parameter, request body or response in which operation), a one-line explanation of why the categorization landed where it did, the oasdiff rule it follows, and a remediation hint where a safer alternative exists. The result is the kind of artifact a producer team can take to a consumer team without ambiguity: here is exactly what changed, here is what each change means for you, here is the version bump it implies. Everything runs in the browser; you can paste internal contracts without exposing them to a third-party service.
When to use the Breaking Change Detector
Reviewing a pull request that touches an API schema. A diff in YAML is hard to translate into "is this safe to release?" Drop the previous and proposed schemas into the detector and the verdict appears in seconds. Use the categorized output as the basis for the PR's compatibility section.
Cutting a release and writing the changelog. The detector's markdown output is structured for direct paste into release notes. The "Breaking" and "Added" sections give consumers a precise map of what they need to do to upgrade.
Auditing a vendor SDK upgrade. The vendor's release notes claim "minor changes." Run the diff against their old and new OpenAPI specs and you can confirm or refute the claim before scheduling the upgrade. A vendor that ships breaking changes under a minor version bump is a vendor whose changelog you have to verify.
Deciding what version bump to ship. The detector's classification maps directly to semantic versioning: any breaking change forces a major bump; any non-breaking addition is a minor; warnings-only is typically a patch. Use the output as the input to your release decision instead of debating it in a Slack thread.
Walkthrough with a real example
Paste this previous version of a Product schema on the left:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["id", "name", "price"],
"properties": {
"id": { "type": "string" },
"name": { "type": "string", "minLength": 1, "maxLength": 200 },
"price": { "type": "number", "minimum": 0 },
"description": { "type": "string" },
"status": {
"type": "string",
"enum": ["draft", "active", "discontinued", "out_of_stock"]
}
}
} And this proposed next version on the right:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["id", "title", "price", "currency"],
"properties": {
"id": { "type": "string" },
"title": { "type": "string", "minLength": 3, "maxLength": 120 },
"price": { "type": "number", "minimum": 0, "maximum": 100000 },
"currency": { "type": "string", "enum": ["USD", "EUR", "GBP"] },
"description": { "type": "string", "maxLength": 5000 },
"status": {
"type": "string",
"enum": ["draft", "active", "archived"]
}
}
}
Judged as requests (data clients send, the default), the detector reports six breaking changes, one warning and one non-breaking change. Two required properties were added, title and currency, so a client sending the old shape is now rejected. Two enum values were removed from status, discontinued and out_of_stock. price gained a maximum and description a maxLength where there were none: requests that passed before can now fail. Removing name is a warning, since a client that still sends it may be rejected or have it ignored, and the new enum value archived is safe in a request.
Switch "Judge the schemas as" to responses and the verdict turns round: two breaking changes, six non-breaking. A client reading the response loses name, which was required, and may now get archived, a status its code doesn't handle. The new limits and the removed enum values only narrow what the server sends, and the new required properties are extra data, so they're safe. The rename from name to title shows up as a removal plus an addition in both directions: the detector can't tell a rename from two separate changes.
The safer release path: keep name alongside title for a major version, make currency optional with a server-side default, and keep accepting the removed status values for a cycle. That turns a forced migration into a minor release with a deprecation timeline.
API evolution concepts you should know
Backward versus forward compatibility. A change is backward compatible if old consumers continue to work against the new producer; forward compatible if new consumers continue to work against the old producer. Most evolution work focuses on backward compatibility because consumer rollouts lag producer releases. Forward compatibility matters when consumers are pushed updates faster than producers (the inverse of most enterprise environments).
Requests and responses break in opposite directions. A request schema must keep accepting everything it accepted, so tightening it breaks clients: a new required field, a lower limit, a removed enum value. A response schema must stay within what clients were promised, so loosening it breaks them: a required field made optional, a new enum value, a field that can now be null. The detector judges each schema in its direction, as oasdiff does: from the client's side, where breakage shows up.
Semantic versioning for APIs. SemVer's MAJOR.MINOR.PATCH maps to "breaking changes," "additive changes," and "internal fixes." Bump MAJOR when any consumer must change to keep working. Bump MINOR when consumers can adopt new features at their own pace. Bump PATCH for behavior fixes that do not change the schema. Strict adherence to SemVer means consumers can pin to a major version and trust upgrades within it.
Deprecation lifecycles. The pattern that scales: announce the deprecation at version N (typically with a deprecation header on responses or a flag in the schema); add the replacement at version N+0.1; ship both side-by-side for a window measured in months for public APIs; remove the deprecated form only at version N+1.0. Skipping any step here generates angry support tickets.
Additive-only evolution. The discipline of accepting that you will only add to an API, never modify or remove. New optional fields, new enum values, new endpoints — these can be released indefinitely without a major bump. The cost is accumulating cruft; the benefit is consumers that never break. Many high-stability APIs (Stripe, AWS) maintain the discipline for a decade or more.
How schema changes propagate. A change to a shared component schema affects every operation that references it. The detector resolves $ref pointers and reports the change once for each operation that uses the component, in that operation's direction, so the blast radius of a single component edit is visible. This is the easiest source of accidental breakage in a large OpenAPI spec.
Common mistakes
Adding a new required field without a deprecation cycle. Even if the new field has a sensible default on the server, a strict consumer that round-trips the response back to the producer will lose the field's value. Add as optional first, give consumers a release to pick it up, then promote to required.
Renaming fields without keeping the old name as an alias. Renames are the highest-frequency cause of avoidable breakage. Either keep the old name as a deprecated alias for one major version, or do the rename behind a feature flag that consumers can opt into.
Removing enum values that consumers actively send. Enums are the API contract's vocabulary. Removing a value rejects every payload that used it. Mark removed values as deprecated for a release cycle and only delete them when traffic to them goes to zero.
Tightening constraints silently. Lowering a max, raising a min, or adding a stricter pattern rejects payloads that previously validated. Treat constraint tightening as breaking even if your tests still pass — somewhere out there is a producer-fixture file with the old bounds.
Assuming description changes are always safe. Most of the time they are. But documentation changes can affect autogenerated SDKs (some generators use descriptions in JSDoc), automated test suites that snapshot the spec, and API gateways that use descriptions for catalog metadata. The detector, like oasdiff's changelog, doesn't compare descriptions or examples, so review those edits yourself.
FAQ
What counts as a breaking change in an API?
A change that can make a client that followed the old contract fail. The detector uses the rules of oasdiff, the open-source OpenAPI diff tool, and names the rule for each change. Breaking: a removed path or operation that wasn't deprecated first; a new required parameter or request property; a parameter or request property made required; a new required request body; a removed success response or response media type; a removed required response property, or one made optional; a changed type; and, in requests, a removed enum value, a new enum, const or pattern, a new or lower maxLength, maximum or maxItems, a higher minLength, minimum or minItems, and null no longer allowed. In responses the same limits break clients the other way round: a new enum value, a looser limit or a newly nullable property. A changed pattern and a removed parameter or request property are warnings.
How do I find breaking changes between two OpenAPI specs?
Paste the old spec, as JSON or YAML, in Previous Version and the new one in New Version, and choose Compare. When both are OpenAPI or Swagger specs, each is first checked against its version's official schema with the OpenAPI Validator's engine, and any errors are listed above the comparison. Every difference is listed as breaking, a warning or non-breaking, with the operation and the parameter, body or property it's in, why it landed there and the oasdiff rule it follows. The changelog, which you can copy or download as Markdown, turns them into release notes.
Does the detector work with full OpenAPI specs, or only with bare JSON Schemas?
Both. For OpenAPI 3.x and Swagger 2.0 specs it matches operations by method and path, ignoring path parameter names, so renaming {id} to {userId} isn't a change. In each operation it compares the parameters, the request body and the responses by status code and media type, and their schemas. A change to a shared component is reported at each operation that uses it. Two bare JSON Schemas are compared the same way as one request or response body: choose whether to judge them as requests (data clients send, the default) or responses (data clients receive), because the same change can be safe one way and breaking the other.
Does it follow $ref pointers when comparing two schemas?
Yes, internal ones: a $ref to #/components/…, #/definitions/… or #/$defs/… is resolved in its own document where it's used, so you get the change in each operation, not a diff of the definitions. A recursive schema is followed once round. External pointers to other files aren't followed; inline them before pasting.
What doesn't the detector compare?
It compares what's listed above and nothing else: not oneOf, anyOf or allOf branches, additionalProperties, format, security schemes, response headers, examples or descriptions. oasdiff reports no change for additionalProperties either, and its changelog leaves documentation out. For the rest, run oasdiff itself.
Can I run this check automatically in CI?
Not with Schema.biz itself: the detector is an interactive web tool, and there is no Schema.biz command-line package. For OpenAPI specs, the open-source oasdiff tool can run in CI: run with --fail-on ERR, it compares the spec in a pull request with the version on your main branch and exits non-zero when it finds breaking changes.
# base.yaml: the spec on your main branch. openapi.yaml: the spec in the pull request.
oasdiff breaking --fail-on ERR base.yaml openapi.yamlThe detector follows oasdiff's rules and levels for the changes it compares, and names each rule, so you can look a result up in oasdiff's checks. oasdiff checks more, such as security, headers and oneOf branches.
Does the detector generate a release changelog?
Yes. Generate Changelog writes Markdown with a summary line and three sections, Breaking Changes, Warnings and Non-Breaking Changes. Each line has the change, where it is and its oasdiff rule; breaking changes add why and what to do instead. Copy it or download it as a .md file for release notes or a pull request.
Related tools and guides
- OpenAPI Validator: the detector checks both versions with its engine before comparing them; open a spec there to fix its errors line by line.
- OpenAPI Editor — author and validate the spec before you cut a release; the editor's preview makes it easy to review the consumer-facing documentation alongside the changes the detector flags.
- JSON Schema Validator — when a breaking change is reported, validate real payloads against both versions to see exactly which payloads stop working.
- Schema Format Converter — when consumers consume the schema as TypeScript types or Zod validators, regenerate them after a release so the type changes propagate cleanly.
- API Versioning Guide — covers when to choose URL-based, header-based, or query-parameter versioning, and the operational patterns for running multiple versions in parallel.
- Complete Guide to JSON Schema — the underlying vocabulary the detector compares; understanding the keywords lets you anticipate which edits will be classified breaking.