API Testing · Senior · Question 75 of 75
How should breaking-change detection be automated for OpenAPI specs?
- 1Diff the spec against the released one in CI and fail on breaking changes
- 2Ask reviewers to read the whole spec on every pull request
- 3Compare the spec's file size with the last released version
Show the answer
Correct answer: Diff the spec against the released one in CI and fail on breaking changes
Explanation
Spec diff tools classify changes (removed field, new required parameter, changed type). Blocking them in CI turns the compatibility policy into a check.