Test the promise your API makes to every client.
Unit tests prove code behaves as expected. API contract tests protect the interface other teams and customers rely on, even when the implementation behind it changes.
Keep a versioned contract
Store the OpenAPI specification with the service so the reviewed contract changes in the same pull request as the implementation.
Compare compatibility
Check the proposed contract against the base branch and distinguish safe additions from changes that can break existing clients.
Make failure actionable
Show the affected path, operation and reason inside the GitHub check so the author can fix or deliberately version the API.
Protect every pull request automatically
Install the GitHub App, choose a repository and get a clear pass or fail status whenever its OpenAPI contract changes.
Frequently asked questions
How is contract testing different from unit testing?
Unit tests validate implementation behaviour. Contract testing validates that the public interface remains compatible for its consumers.
Do I need to run the API to compare specifications?
No. API Contract Guard performs a static comparison of the base and candidate OpenAPI documents.
Does a new endpoint count as breaking?
Normally no. Additive changes are reported as safe while removals and incompatible requirements fail the check.