oasdiff
$ oasdiff Official Low Riskoasdiff compares two OpenAPI 3 specifications to detect breaking changes, generate structured changelogs, or compute full structural diffs. With native --format json across breaking, changelog, and diff, plus zero filesystem writes, it is an ideal contract-safety gate for API agents.
brew install oasdiff Direct oasdiff breaking --format json gives deterministic semantic OpenAPI diffs locally without sending full specs into an LLM or MCP tool.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --format json and yaml across breaking, changelog, and diff, deterministic exit codes (--fail-on), and zero interactive prompts.
- Native
--format jsonacrossbreaking,changelog, anddiff - Deterministic non-interactive comparison
Strictly read-only OpenAPI comparison tool with zero file writes, mutations, or credentials.
- 100% read-only operation
Single static Go binary installable via Homebrew, go install, Docker, or GitHub releases across macOS, Linux, and Windows.
brew install oasdiffand single binary releases
Far more reliable and token-efficient for agents than manually diffing raw YAML files to spot subtle OpenAPI compatibility regressions.
- Semantic OpenAPI 3 breaking-change detection out of the box
Official oasdiff/oasdiff repository actively maintained under Apache-2.0.
- Official
oasdiff/oasdiffGitHub repository
Clear documentation and examples on oasdiff.com and GitHub README.
- Official docs at oasdiff.com/documentation
Security, Auth & Guardrails
None required; compares local or HTTP-fetched OpenAPI specification files.
Core CLI is free and Apache-2.0 open-source; optional commercial PR-approval features exist.
# oasdiff Agent Rules - Always pass `--format json` when inspecting `breaking`, `changelog`, or `diff` results. - Use `oasdiff breaking base.yaml rev.yaml --fail-on ERR` in CI/pre-commit checks to catch client-breaking API edits.
Agent-Ready Command Recipes
Safe Read-Only Queries
oasdiff breaking base.yaml rev.yaml --format json
Compares base.yaml against rev.yaml read-only and outputs structured JSON breaking-change entries.
oasdiff changelog base.yaml rev.yaml --format json
Emits all breaking and non-breaking consumer-facing changes as JSON.
Strengths for Agents
- + Strictly read-only with native
--format jsonacrossbreaking,changelog, anddiff. - + Catches subtle semantic OpenAPI breaking changes that line-based
git diffmisses. - + Fast single Go binary with zero runtime dependencies.
Caveats & Pitfalls
- ! Targets OpenAPI 3.x specifications (Swagger 2.0 specs must be converted to OpenAPI 3 first).
- ! Enterprise PR sign-off workflow features sit outside the open-source CLI.