Search docs
Docs searchValidation rule
Back to Rule CatalogAP-API-015API DesignContract implementation drift
Flags API behavior whose implementation and contract appear to have drifted apart.
warningviolationNo auto-fix
How to fix
- Regenerate or update the API contract.
- Align implementation with the documented contract where the contract is correct.
- Review contract changes in the same pull request as API changes.
What it means
The OpenAPI or API contract does not match the implemented route, method, or shape.
Why it matters
Contract drift surprises clients and weakens CI review for API changes.
Common causes
- The contract was not regenerated after implementation changes.
- Routes were renamed without updating OpenAPI.
- Response DTOs changed without contract review.
Example bad pattern
OpenAPI says PATCH /repositories/:id accepts status, but implementation expects lifecycleStatus.Example good pattern
Contract and implementation use the same method, route, request body, and response shape.Related files/config
contracts/openapi.yamlapps/api/src
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs