Stop Breaking Changes

An OpenAPI breaking change refers to a modification or update made to an API's contract (defined using the OpenAPI Specification) that introduces incompatibilities with existing client applications or consumers of the API. These changes can disrupt the functionality of client applications and potentially cause them to break or malfunction.

To avoid breaking changes, developers need to follow two basic rules:

However, in practice, these rules are very difficult to follow because of the complexity of OpenAPI.
There are many unexpected ways a developer could mistakenly break these rules.
Moreover, many development teams are generating OpenAPI specs from code, for example using FastAPI or oapi-codegen, which further contributes to the complexity.

Other examples of OpenAPI breaking changes:

To prevent breaking changes in an OpenAPI-based API, consider the following practices:

By employing these practices, you can minimize the risk of breaking changes in your OpenAPI-based API and ensure a smoother transition for client applications when modifications are necessary.

Using oasdiff, you can detect over 100 kinds of breaking-changes and inform API developers and consumers, in simple language, what the change is and why is it considered breaking.