Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openapi-guard

Catch breaking OpenAPI changes before they reach your consumers.

openapi-guard compares two OpenAPI 3 documents and reports removed operations, removed response codes, newly required request parameters, newly required request bodies, and required request fields that were added to existing schemas. It is a small, CI-friendly complement to full contract-testing platforms.

Quick start

pipx install openapi-guard
openapi-guard openapi.yml openapi.next.yml
openapi-guard openapi.json openapi.next.json --format json --fail-on breaking

The command exits non-zero when breaking changes are found and can emit stable JSON for CI annotations. YAML support uses PyYAML; JSON works without YAML syntax.

Design boundaries

This is a structural diff, not a runtime compatibility guarantee. It does not call endpoints, infer business rules, or claim that two schemas are semantically identical. Review the report alongside contract tests and consumer requirements.

Why star this repository

Star this project if you publish APIs, maintain OpenAPI specs, review versioned contracts, or want a focused breaking-change gate that is easy to run locally and in CI.

Development

git clone https://github.com/varungor365/openapi-guard
cd openapi-guard
python -m pip install -e ".[dev]"
pytest -q

License

MIT.

About

Detect structural breaking changes between OpenAPI 3 documents before they reach API consumers.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages