OpenAPI Diff
Diff two OpenAPI 3 or Swagger specs and list breaking changes with severity.
Install
irm https://raw.githubusercontent.com/chayprabs/localtools/main/openapi-diff/install.ps1 | iexlocaltools-openapi-diff updatelocaltools-openapi-diff uninstall
curl -fsSL https://raw.githubusercontent.com/chayprabs/localtools/main/openapi-diff/install.sh | bashlocaltools-openapi-diff updatelocaltools-openapi-diff uninstall
brew install chayprabs/localtools/localtools-openapi-diffbrew upgrade localtools-openapi-diffbrew uninstall localtools-openapi-diff
scoop bucket add localtools https://github.com/chayprabs/homebrew-localtools; scoop install localtools-openapi-diffscoop update localtools-openapi-diffscoop uninstall localtools-openapi-diff
winget install localtools.OpenapiDiffwinget upgrade localtools.OpenapiDiffwinget uninstall localtools.OpenapiDiff
Opens at http://127.0.0.1:47111 in your browser. Run localtools-openapi-diff --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.
Direct download
| Platform | File | Size |
|---|---|---|
| Linux ARM64 | openapi-diff-1.0.4-linux-arm64.zip | 4.8 MB |
| Linux x64 | openapi-diff-1.0.4-linux-x64.zip | 5.3 MB |
| macOS Apple Silicon | openapi-diff-1.0.4-macos-arm64.zip | 5.0 MB |
| macOS Intel | openapi-diff-1.0.4-macos-x64.zip | 5.4 MB |
| Windows x64 | openapi-diff-1.0.4-windows-x64.zip | 5.5 MB |
SHA-256 checksums are in the release notes; the install scripts verify them for you.
See it
How to use
- Drop or paste the old spec under Base and the new spec under Revision (YAML or JSON; OpenAPI 3.0, 3.1 or Swagger 2.0). For multi-file specs, drop a zip of the folder.
- Press Compare. Breaking changes and warnings are listed per operation, each with its oasdiff check ID, what clients must do, and the source line.
- Tick Show non-breaking for the full changelog, copy the Markdown summary into your PR, or download the JSON.
- In CI: localtools-openapi-diff check base.yaml revision.yaml --fail-on breaking --format markdown exits 1 when breaking changes are found.
FAQ
Which changes count as breaking?
The tool uses oasdiff's rule set (300+ checks). Examples: removed operations, new required parameters, removed enum values in requests, removed or retyped response properties. Every change carries its check ID, so you can look up the exact rule.
Can it diff specs split across several files?
Yes. Local $refs are followed. In the UI, zip each spec folder and drop the zips. On the command line, pass the root files and the referenced files are read from disk. Remote http $refs are refused because the tool stays offline.
Does it support Swagger 2.0?
Yes. Swagger 2.0 documents are converted to OpenAPI 3 with kin-openapi before the diff, so both sides can even use different versions. Swagger 2.0 files that reference other files are not supported.
What exit codes does the check command use?
0 when nothing reaches the --fail-on level (default breaking), 1 when something does, 2 on errors such as an unreadable or invalid spec.
Are my specs uploaded anywhere?
No. The tool runs on 127.0.0.1, uploads go to a temporary folder that is deleted after each request, and the page makes no network requests.