Direct answer
Can Diff Anything detect breaking OpenAPI changes?
Diff Anything compares OpenAPI and JSON Schema as parsed contracts and labels likely breaking changes with heuristic rule codes, such as a removed operation or a new required input. With Pro, the CLI and batch manifests run the same comparison in CI, with the Microsoft Store version on Windows or the free command-line helper for the Mac App Store version: identical schemas pass, and --fail-on breaking fails the job only on breaking or unclassified changes, with each finding's rule code in JUnit and SARIF. The rules are heuristic, so flagged and passing results still need contract review.
Supported schemas
OpenAPI, JSON Schema, GraphQL, and SQL tables.
API Schema mode compares OpenAPI and JSON Schema documents written in JSON or YAML. Auto detects them from top-level keys such as openapi, swagger, or $schema. The same mode also reads GraphQL type, interface and input definitions, and SQL CREATE TABLE statements.
Every change is listed with its location, for example $.paths["/users"].get.parameters[0]. If the two sides are written in different schema languages, the result says that classification is structural only.
Breaking-change rules
Likely breaking changes are labelled with a rule code.
Each difference is checked against a set of compatibility rules. A match is labelled "Breaking API change" with its rule code, and the Breaking filter in the difference list shows only those items. A note above the result gives the verdict, such as "2 potentially breaking API change(s) detected by heuristic rules". Identical or equivalent schemas, including the same schema written once in JSON and once in YAML, report no differences.
- API001: an operation, parameter, response, or path was removed
- API002: a field, column, or type member was removed
- API003: a value was removed from an enum, oneOf, or anyOf
- API004: a new required input was added
- API005: an optional or nullable value became required
- API006 and API007: a minimum or maximum constraint became stricter
- API008: security requirements were added or changed
- API009: a published value changed type
- API010: a GraphQL field signature or SQL column definition changed
- API011: a value a response guaranteed is now optional or nullable
- API012: a new constraint narrows the values an input accepts
How to read it
Treat the classification as a review aid.
From version 1.8.1, the API rules follow local $ref references within the document and distinguish request constraints from response guarantees. API011 flags a response guarantee becoming optional or nullable; API012 flags a new constraint narrowing accepted input. External reference files are not loaded. The rules are heuristic: review the full result and test the consumers affected by a contract change.
Parameter lists whose entries have unique names on both sides are matched by name instead of position. Read every flagged item and the remaining changes before deciding whether clients are affected. When no rule matches, manual contract review is still required.
CI gate
Fail a CI job only on breaking changes with Pro.
With Pro, --mode api runs the comparison from the command line with summary, terminal, or JSON output, on Windows and, through the free command-line helper, on a Mac. Add --fail-on breaking and the command returns 1 only when a change is breaking or could not be classified; identical schemas and non-breaking changes return 0.
In a batch manifest, set failOn: breaking on an API case. JUnit output lists the breaking changes with their rule codes, and SARIF reports each finding as its own result, with breaking changes under their rule code as errors. The rules are heuristic, so treat a passing check as a first gate, not as proof that clients are unaffected.
Best for
Where this workflow fits.
- Reviewing an OpenAPI or JSON Schema change before it is released to clients
- Getting a first list of likely breaking changes to check by hand
- Comparing API definitions that must stay on your own machine
No accounts, cloud comparison service, analytics, or telemetry.
Relevant capabilities
What Diff Anything brings to the job.
Practical workflow
From setup to a reviewed result.
Open the released and candidate specs
Choose the two OpenAPI or JSON Schema files. Auto opens them in API Schema mode.
Filter to Breaking
Use the Breaking filter to see the changes that matched a compatibility rule first.
Check each flagged change
Read the rule code and location, then decide whether it affects requests, responses, or neither.
Review the remaining changes
Switch back to All and review the remaining changes, including descriptions, examples and changes whose effect depends on how clients use the contract.
Useful in practice
Direct answers
Questions about OpenAPI diff tool.
Can Diff Anything detect breaking OpenAPI changes?
Diff Anything compares OpenAPI and JSON Schema as parsed contracts and labels likely breaking changes with heuristic rule codes, such as a removed operation or a new required input. With Pro, the CLI and batch manifests run the same comparison in CI, with the Microsoft Store version on Windows or the free command-line helper for the Mac App Store version: identical schemas pass, and --fail-on breaking fails the job only on breaking or unclassified changes, with each finding's rule code in JUnit and SARIF. The rules are heuristic, so flagged and passing results still need contract review.
Does it support Swagger 2.0 and OpenAPI 3?
Both are detected and compared as JSON or YAML documents. The same compatibility rules apply to both; there are no version-specific rules.
Are $ref references resolved?
Yes, local $ref references within the same document are followed by the API rules, with a bounded reference depth. External reference files are not loaded. A changed contract still needs review and consumer testing.
Can a CI job fail only on breaking changes?
Yes, with Pro, on Windows or, through the free command-line helper, on a Mac. Use --mode api --fail-on breaking, or failOn: breaking in a batch manifest. The job fails only on breaking or unclassified changes, and identical schemas pass.
Is API schema comparison part of the free plan?
In the app, yes: the free plan shows the complete result for files up to 5 MB, with 10 comparisons per day. The command-line api mode, --fail-on breaking, and batch manifests need Pro.
Go deeper
Run repeatable comparisons, read highlighted terminal output, interpret exit codes, integrate with Git, and publish machine-readable CI results.
Read Use Diff Anything from the CLI, Git, and CIFree & Pro: what’s included
Available on the Mac App Store and Microsoft Store. Free desktop use lets you try every comparison engine for files up to 5 MiB per side and 10 new comparison sessions per local day; collection previews show the first 100 items, binary comparisons the first 100 byte differences, and PDF previews the first 3 pages. Plain text, JSON, and Jupyter notebook comparison are complete, and opening files from Finder or File Explorer, diffanything:// links, and AppleScript are free. The free CLI supports text, JSON, and notebooks, and in the Microsoft Store version previews folder synchronization with --dry-run, and the command-line helper that brings the CLI to the Mac App Store version is a free download that uses the Pro purchase made in the app. A one-time Pro purchase removes the preview and session limits and unlocks larger sources within technical limits, saved profiles and history, saving folder snapshots, report export and printing, JSON Patch export, applying patches, three-way merge and conflict resolution, the Git merge driver and merge tool, folder synchronization and Update both, file actions in folder comparisons, batch manifests, every CLI mode, and, on Windows, trusted preprocessors.