OpenAPI Diff Explorer
Compare two versions of an OpenAPI spec and see exactly which changes break clients.
How it works
Paste or link two OpenAPI 3.x (or Swagger 2) documents in JSON or YAML. Every operation, parameter, request body, response and schema property is compared (with $ref resolution), and each change is classified as breaking, potentially breaking or non-breaking, with the direction-aware rules API teams use (e.g. a new required request field breaks clients; a new response field does not; a new response enum value might).
- Operations are matched by method + path; paths that differ only in parameter names ({id} vs {orderId}) are treated as the same operation.
- Request side (parameters, bodies): removing accepted values, adding required inputs, tightening limits or changing types is breaking.
- Response side: removing properties or success responses, or making a guaranteed field optional, is breaking; new enum values, new nullability and new success codes are potentially breaking; additions are non-breaking.
- Local $refs are resolved (cycles detected). Removed operations and changed security requirements are breaking.
- Semver advice: any breaking change → major; additions only → minor; otherwise patch.
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Opsdeck Developer & ops workbench
One deck for CI failures, cron, traces, k8s events, API diffs, query plans and Terraform.
Related tools
- MCP Server Explorer – Inspect any MCP server before you connect an AI agent: tools, permissions, risks, changes over time.
- Dependency Vulnerability Explorer – Known vulnerabilities in your dependencies, and the version that fixes each one.
- Explorer of Everything – Search transactions, contracts, domains, packages, advisories, MCP servers and websites in one box.
How to use the OpenAPI Diff Explorer
Compare two OpenAPI or Swagger versions and see every change classified as breaking, potentially breaking or non-breaking, with semver advice.
What it is for
"It's only a small change" is how most API outages begin. A response field disappears, a request limit is lowered, a new required property sneaks into a request body, and integrations that worked yesterday fail. Reading two specs side by side won't reliably catch this, especially when schemas are shared through $ref.
Paste or link two OpenAPI 3.x or Swagger 2 documents (JSON or YAML). The tool resolves local $refs and compares every operation, parameter, request body, response and schema property. Each change is classified with direction-aware rules: what breaks a client depends on whether the change is in what the client sends or what it receives. A new required request field breaks clients. A new response field doesn't. A new response enum value might. At the end you get semver advice: major, minor or patch.
It compares documents, not behaviour. If the implementation changed without the spec, or the spec was never accurate, the diff can't know.
Worked example
The built-in example compares a small Shop API before and after a refactor. Both files still say version: 1.0.0.
4 breaking, 2 potentially breaking and 0 non-breaking changes → major version bump. First: operation removed at DELETE /orders/{id}.
| Severity | Location | Change |
|---|---|---|
| Breaking | DELETE /orders/{id} | operation removed (deleteOrder) |
| Breaking | GET /orders 200[].total | response property removed |
| Breaking | GET /orders query:limit | maximum tightened 100 → 50 |
| Breaking | POST /orders body.quantity | required property added (integer) |
| Potentially breaking | GET /orders 200[].status | enum value cancelled added |
| Potentially breaking | POST /orders body.note | request property removed |
Two of these are easy to miss by eye. The total removal comes from the shared Order schema, so it shows up under GET /orders even though that operation's own YAML is unchanged. The new cancelled status looks like an addition, but a client with an exhaustive switch over statuses will hit its default branch or throw.
The advice is major, and the spec still says 1.0.0. Either bump the version or rework the changes to be additive: make quantity optional with a default, keep total, deprecate the DELETE before removing it.
How to read the result
- Counts and semver advice — any breaking change → major; only additions → minor; otherwise patch.
- Severity — breaking will fail existing clients; potentially breaking depends on how clients are written (strict validation, exhaustive enums); non-breaking is additive.
- Location — method + path, then where in it:
query:limit,body.quantity,200[].status(the[]means array items). - Detail — the old → new value or the reason, e.g. "clients still sending it may be rejected".
Tips and common mistakes
- Put the older spec in "Old" and the newer in "New". Swapping them inverts additions and removals and makes the classification meaningless.
- Paths that differ only in parameter names (
{id}vs{orderId}) count as the same operation, so renaming a path parameter isn't flagged as remove-and-add. - Changed security requirements are breaking. Moving an endpoint from public to OAuth will fail every anonymous client.
- Run the diff in CI on every pull request that touches the spec. Breaking changes are cheapest to catch before merging.
- Only local
$refs are resolved. Bundle multi-file specs into one document first, or the referenced parts aren't compared.
FAQ
Why is a new enum value only "potentially" breaking?
Clients that ignore unknown values are fine, but generated SDKs with strict enums or exhaustive switches can fail. It depends on the client, so the tool flags it for review.
Is removing an optional request field breaking?
It's potentially breaking. Clients still sending it may be rejected if the server or a gateway validates strictly against the new schema.
Can I compare specs by URL?
Yes. Enter public URLs for the old and/or new spec instead of pasting them, in JSON or YAML.
Does it support Swagger 2.0?
Yes. Swagger 2 and OpenAPI 3.x documents can both be compared.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://openapidiffexplorer.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://openapidiffexplorer.usefulweb.site/mcp· tool nameopenapi_diff_explorer
Example request
curl -s -X POST https://openapidiffexplorer.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'