-
Notifications
You must be signed in to change notification settings - Fork 91
Prevent Breaking Changes
ruleset:
- "breaking-changes":
exclude_operations_with_extension: "x-draft"exclude_operations_with_extension (optional): Sometimes you do not want breaking change checks to run. For example, if you are working design-first the API will change a lot as you iterate on the design, failing work in progress does not make sense.
If you set exclude_operations_with_extension: "x-draft", than every API operation marked with that extension are skipped.
Since breaking changes are allowed in major versions, all breaking change checks will pass if you change you make a major version bump.
Major version All breaking changes allowed
info:
version: '2.0.0' # previous 1.4.5
Minor version. Breaking change checks will run
info:
version: '1.5.0' # previous 1.4.5
- Prevent adding a required Query Parameter
only applies to existing operations, new operations can have required query parameters
- Prevent changing an optional Query Parameter to required
only applies to existing operations, new operations can have required query parameters
- Prevent adding a required Header Parameter
only applies to existing operations, new operations can have required query parameters
- Prevent changing an optional Header Parameter to required
only applies to existing operations, new operations can have required header parameters
- Prevent adding a required Cookie Parameter
only applies to existing operations, new operations can have required query parameters
- Prevent changing an optional Cookie Parameter to required
only applies to existing operations, new operations can have required cookie parameters
- Prevent restricting the options for an enum Parameter
applies to parameters with enum schemas. Removing an option that was supported previously is a breaking change
- Prevent changing the type of Parameter
applies to parameters with schemas. Incompatible type changes are a breaking change
- Prevent removing an Operation
applies to every operation
- Prevent removing a documented Response Status Code
applies to every operation
- Prevent making an optional Property required
applies to existing properties in existing operations. Request Properties in new operations can be made required
- Prevent adding a required Property
applies to existing operations. Adding required properties is a breaking change. Request Properties in new operations can be made required
- Prevent changing the type of Property
Incompatible type changes are a breaking change
- Prevent making a required Property optional
applies to existing properties in existing operations. Response Properties in new operations can be made optional
- Prevent removing a required Property
applies to existing operations. Removing required response properties is a breaking change.
- Prevent changing the type of Property
Incompatible type changes are a breaking change
Generate OpenAPI from Traffic
Using Optic Capture with Tests
Using Optic Capture with Postman
Breaking Change and Style Checks