An OpenAPI breaking change is any edit to the contract after which a client built against the previous version can no longer send a valid request, parse the response, or rely on the same meaning. You detect them by diffing the last published contract against the proposed one in CI, classifying each change by direction (request or response), and blocking the release on the risky categories. The diff finds most structural breaks. It misses behavior changes that leave the file looking additive, as the worked example below shows.
Last checked November 15, 2026 against OpenAPI Specification 3.2.1, Google AIP-180 and the Microsoft Azure REST API Guidelines.
Treat the contract as an interface, not a document
The OpenAPI Specification defines a language-independent description of an HTTP API. Tools use that description for documentation, client generation, server stubs and tests. Those uses make the file operational: a changed path, parameter or schema can alter generated code and validation before anyone reads the release note.
The top-level openapi field identifies the version of the specification used to interpret the file. The specification says this “is not related to the info.version” string, which describes the API document. Increasing info.version records a release; it does not prove that old clients remain compatible.
Start a review by comparing the last contract that consumers could actually use with the proposed contract. A diff against an arbitrary branch or an unpublished intermediate file can give the wrong answer.
Breakage depends on direction
Requests and responses carry different risks.
For a request, the server receives data from an existing client. Making a previously optional field required can reject old traffic. Tightening a pattern, shortening a maximum length or removing an accepted enum value can do the same.
For a response, the client receives data from the server. Removing a field or changing its type can break parsing. Adding a field is usually easier for clients that ignore unknown properties, but not every generated model or validator does. Adding a response enum value is risky when a client treats the known set as exhaustive.
This direction test catches more real problems than a simple “added is safe, removed is breaking” rule.
| Contract change | Request risk | Response risk |
|---|---|---|
| Add an optional property | Usually low if the old default behavior remains | Usually low if clients tolerate unknown fields |
| Add a required property | High: existing clients do not send it | Depends on whether the server always supplies it and clients can parse it |
| Remove a property | Existing clients may still send it | High if clients read it |
| Change string to number | High | High |
| Narrow a range or pattern | Previously valid requests may fail | Previously returned values may no longer match client assumptions |
| Add an enum value | Usually low for requests | Can break exhaustive client code |
| Change a default value | High: omitted fields now mean something else | High if clients rely on the old default |
| Remove or rename an operation | High | High for every consumer that calls it |
A rename is not a cosmetic edit. Google’s AIP-180 states that renaming a component “is semantically equivalent to ‘remove and add’”.
A worked example: seven edits to one orders API
Here is a hypothetical release of a small orders API, the kind of pull request a reviewer might see on a Friday. The released contract is OpenAPI 3.0.4; the proposal touches seven things. We classified each one against the rules in AIP-180, the Microsoft Azure REST API Guidelines and the OpenAPI specification.
| # | Proposed edit | Direction | Looks like, in a structural diff | Verdict | Why |
|---|---|---|---|---|---|
| 1 | Add optional query parameter status to GET /orders | Request | Addition | Safe | Omitting it returns the same list as before |
| 2 | Add currency to required in the POST /orders body | Request | Constraint change | Breaking | AIP-180: “New required fields must not be added to existing request messages” |
| 3 | customer_note maxLength 500 to 200 | Request | Constraint change | Breaking | A 300-character note that worked yesterday is rejected today |
| 4 | Response state enum gains on_hold | Response | Addition | Breaking for closed enums | AIP-180 warns user code may not handle new values; Microsoft recommends extensible enums so values can grow |
| 5 | GET /orders gains limit with a default of 50, where it used to return every order | Response | Addition of an optional parameter | Breaking | Old clients now silently get page one only; Microsoft’s guidelines say “it is a breaking change to add paging in the future” |
| 6 | openapi: 3.0.4 changed to 3.1.2, schemas untouched | Both | Version string | Breaking where nullable is used | 3.1 has no nullable keyword; see the next section |
| 7 | Rewrite three description fields | Neither | Text change | Safe | No effect on requests, responses or behavior |
Count the result: four of the seven edits are breaking (2, 3, 5, 6), one depends on how clients treat enums (4), and two are safe (1, 7). Only two of the breaking ones, the new required field and the shorter maxLength, show up as constraint changes in a structural diff. Edit 5 appears as a new optional parameter and edit 6 as a one-line version bump. Both would pass a review that reads the diff summary and nothing else, and both would change what an existing client receives.
That is the practical lesson for anyone setting up a breaking-change detector: the tool is the first gate, and the semantic questions in the checklist below are the second.
When the specification version itself changes
Moving a document from OpenAPI 3.0 to 3.1 is often treated as housekeeping. It is not. The 3.0.4 specification builds its Schema Object on “an extended subset” of an older JSON Schema draft and offers a nullable keyword as its way to allow null. The 3.1 specification makes the Schema Object “a superset of the JSON Schema Specification Draft 2020-12”, lists "null" as a type, and has no nullable keyword at all.
So a 3.0 schema with type: string and nullable: true should become type: ["string", "null"] in 3.1. If only the version string changes, a 3.1 validator or code generator no longer reads that schema as allowing null, and a response that legitimately contains null can start failing client-side validation.
The current versions, from the specification’s revision history checked on November 15, 2026:
| Line | Latest release | Date |
|---|---|---|
| 3.2 | 3.2.1 (patch) | September 10, 2026 |
| 3.1 | 3.1.2 (patch) | September 19, 2025 |
| 3.0 | 3.0.4 (patch) | October 24, 2024 |
The specification also says deprecated fields remain part of the OAS until the next major version, so a description using them stays valid within the 3.x line.
Seven changes that deserve a blocking review
1. Paths, operations and parameter locations
Removing /orders/{id}, changing GET to POST, or moving a value from a query parameter to a header changes how the request is built. Even when the new endpoint returns the same data, old integrations cannot discover the move on their own.
2. Required request input
A new field can be added compatibly only when an omitted value keeps the old behavior. AIP-180 says any field populated by clients “must have a default behavior matching the behavior before the field was introduced.” The Azure guidelines go further: required fields can be introduced only in the first version of a service, and making an optional field required, or the reverse, is a breaking change.
3. Types, formats, nullability and defaults
Changing an integer to a string can affect generated code, validation and comparison logic. Changing whether null is accepted can reject payloads or break a client that relied on a value always being present. AIP-180 also treats changing a field’s default value as breaking. Review composed schemas too: a change inside allOf, oneOf or a referenced component may affect many operations at once.
4. Enum values
Removing a value is plainly incompatible; the Azure guidelines say “DO NOT remove values from your enumeration list.” Adding one to a response looks additive, but a mobile app or generated client may use a closed switch statement. AIP-180 allows new values freely only in enums used solely in requests. Microsoft’s answer is the extensible enum, marked with x-ms-enum and modelAsString: true, which tells client libraries to treat the value as an open string.
5. Status codes and error shapes
Changing a successful 200 response to 202 introduces asynchronous behavior even though both codes are valid HTTP. Replacing one error schema with another can break retry logic or remove an error identifier that support relies on. Diff the status and the business meaning, not only the JSON fields.
6. Security requirements
Adding a required scope, replacing an authentication scheme or removing anonymous access changes who can call the operation. OpenAPI can describe alternative security requirements, but the review still needs to confirm the deployed authorization policy and the transition plan.
7. Visible semantics
The file may stay structurally identical while behavior changes. Pagination can gain a smaller default, as in edit 5 above. Sorting can change. A field called amount can keep its number type while moving from major currency units to minor units. AIP-180 says APIs “must not change visible behavior or semantics in ways that are likely to break reasonable user code.”
Use the diff to ask better questions
A contract-diff tool should classify changes, point to the affected operations and fail the build on agreed high-risk categories. It should not have the final word.
For every flagged change, record:
- whether it appears in a request, a response or both;
- whether a field is read, written or generated;
- which public clients or internal services use it;
- whether old behavior remains available;
- whether code generation or strict validation is involved;
- the earliest client version that understands the replacement;
- the rollback path if traffic or errors change.
For every change the tool calls safe, sample at least one generated client and one real payload. Classifications differ between tools, especially around enums, union schemas, additional properties and nullable values.
Put the contract check before deployment
A practical pipeline has four gates.
- Validate the proposed file. Confirm that references resolve, required OpenAPI fields are present and the document matches the intended specification version.
- Diff against the released baseline. Store that baseline as an immutable build artifact or release tag.
- Run consumer examples. Regenerate representative clients and replay request-response fixtures that include old optional fields, unknown response fields, enum handling,
nullvalues and errors. - Check the running service. Contract tests should confirm that deployed responses match the file and that authorization and business behavior have not drifted.
The contract belongs in the same change review as the implementation. Updating it after deployment turns the diff into a record of an incident rather than a release gate.
Deprecate before removal
OpenAPI lets you mark operations, parameters and schemas deprecated. The specification says deprecated elements “SHOULD be transitioned out of usage” but remain usable; the marker does not disable the old surface.
A useful deprecation plan names the replacement, gives consumers a date or condition for migration, keeps telemetry on old use and tests both paths during the overlap. Removal should wait until the promised support window ends and remaining callers are known. Our piece on API deprecation and sunset policy covers the headers and timelines that announce it.
When an incompatible change is unavoidable, a parallel path or a major API version gives clients somewhere to move. A version label alone is not a migration: the new surface still needs a mapping, a coexistence period and observable adoption. The same discipline applies to message formats; see versioned event schemas.
A release checklist
Before approving an OpenAPI change, ask:
- Is the baseline the last published contract?
- Does the proposed file match the implementation?
- Are any paths, operations or parameters removed or renamed?
- Did a request become more restrictive?
- Did a response remove data, change type or gain an enum value?
- Did a default value, page size, status code, error or ordering change meaning?
- Did the
openapiversion change, and werenullableand other version-specific keywords migrated? - Did authentication or required scopes change?
- Have generated clients and old payloads been tested?
- Is a deprecation window documented where needed?
- Can the release be rolled back without corrupting client state?
When a request may be retried during a rollout, pair the contract review with our guide to API idempotency and duplicate operations.





