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 the rule validates
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.
Typical violation example
OpenAPI says PATCH /repositories/:id accepts status, but implementation expects lifecycleStatus.Typical compliant example
Contract and implementation use the same method, route, request body, and response shape.Related rules
AP-API-010 - Missing pagination on collection endpointAP-API-011 - Bulk operation riskAP-API-012 - DTO/entity leakage through API boundaryAP-API-013 - Inconsistent resource design within API
Adjacent categories
Related files/config
contracts/openapi.yamlapps/api/src
Related CLI commands
archpilot validatearchpilot validate --ci
Related docs