Compare two OpenAPI 3.0/3.1 JSON specs and classify each change as breaking, warning or info with ten rules. Use when reviewing an API contract change, checking for breaking changes before a release, or gating CI on API compatibility.
95%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
scripts/openapi_diff.py compares two OpenAPI 3.0.x or 3.1.x documents and labels every change
with one of ten rules.
| Rule | Severity | Meaning |
|---|---|---|
operation-removed | breaking | An operation present in the base is missing in the head. |
operation-added | info | A new operation appears in the head. |
param-added | breaking if required, otherwise info | A parameter appears. |
param-removed | warning | A parameter disappears. |
param-became-required | breaking | A parameter changes from optional to required. |
request-property-became-required | breaking | A request property is newly required, or requestBody.required goes from false to true. |
request-enum-value-removed | breaking | A request enum loses a value. |
response-property-removed | breaking | A response schema loses a property. |
response-enum-value-added | warning | A response enum gains a value. |
type-changed | breaking or warning | A request type set loses a member or a response type set gains one; a change inside allOf, oneOf, anyOf or not is one warning, "composition changed, not analysed". |
{name} with {}; otherwise they must be equal, so a
trailing slash makes a different path.#/...) are supported; they are resolved lazily and cycles terminate.application/json and +json) are compared, and only for response
statuses present on both sides.nullable: true adds null, 3.1 type arrays are
sets and integer is a subset of number. A schema without type accepts every type.readOnly properties and response schemas ignore writeOnly
properties.1 equals 1.0, "1" differs from 1.oneOf or anyOf semantics.Text: one line per change, [severity] rule METHOD path: message (pointer), then
N breaking, N warning, N info. JSON: {"changes": [...], "summary": {...}} where each change
has rule, severity, pointer, message, method and path. Changes are sorted by path,
method and pointer.