When is an API not backward compatible?
An API is considered not backward compatible when changes are made that could break existing integrations.
Requests:
- Changing an optional attribute to required in the request body.
- Adding a new required attribute.
- Deleting an existing required attribute.
- Modifying the format of an attribute.
Check backward compatibility in responses
Check:
- Changing a required attribute to optional.
- Deleting a required attribute in the response.
- Adding a new HTTP response code.
- Modifying the format of attributes or the response itself.
Using openapi-diff to check backward compatibility
You can manually develop compatibility checks or rely on tools to automate the process. At APIQuality, we use openapi-diff, a robust tool designed to detect these changes.
The configuration is too easy, because APIQuality helps to you.
- Execute checks for OpenAPI differences.
- Validate backward compatibility in both requests and responses.