Detecting breaking changes in OpenAPI specs
Tolerant Reader guarantees enforced with --diff under ADP-027.
Classification matrix in api_validator.py --diff
Guard minor releases so existing typed SDKs never break on upgrade.
| Schema edit | Classification | Impact on clients |
|---|---|---|
| Delete path or HTTP method | Breaking | Existing routes return 404 or 405 |
| Add required query/header/body field | Breaking | Unchanged client requests rejected with 400 |
| Change property or parameter type | Breaking | Generated JSON decoders raise type errors |
| Remove enum value on input | Breaking | Previously valid enum choices fail validation |
| Add optional response property or new route | Non-breaking | Tolerant JSON parsers ignore new fields |
Pull request diff gate
git show origin/main:openapi.json > /tmp/base.openapi.json python3 api_validator.py --diff /tmp/base.openapi.json openapi.json --format markdown
Version breaking shifts cleanly
Move unavoidable type or contract breaks onto a new major prefix such as /v2 and publish a Sunset lifecycle plan.