-
Notifications
You must be signed in to change notification settings - Fork 177
fix #461: add minlength breaking change detection #863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #461: add minlength breaking change detection #863
Conversation
core/src/test/java/org/openapitools/openapidiff/core/backcompat/MinLengthBCTest.java
Show resolved
Hide resolved
core/src/main/java/org/openapitools/openapidiff/core/model/BackwardIncompatibleProp.java
Outdated
Show resolved
Hide resolved
|
I think the breaking/non-breaking decision for Reusing the breaking change table from the issue description:
|
My thoughts were similar to exsisting logic of max_lenght in response and clients may have issues if they allocated buffers/UI for the minimum lenght (so a increase in min_lenght 5->10 would be breaking). |
|
@dhananjay12 @ctreatma, from my perspective, there is no silver bullet in this topic. Many discussions in this repo are related to breaking changes detection behaviour, and there is no consensus. So the idea is to keep current behaviour (at least for minor releases) and allow consumers to configure it. I've created related discussion #724 in order to find out a vision on it for major release which can broke the current behaviour and change the defaults. |
Summary
Adds breaking change detection for
minLengthstring property increases in OpenAPI schemas (following the same pattern as existingmaxLengthvalidation).Breaking Change Logic
minLength: 5→minLength: 10minLength: 10→minLength: 5minLength: 5→minLength: 10minLength: 10→minLength: 5New Incompatibility Properties
incompatible.request.min.length.increased=true(enabled by default)incompatible.response.min.length.increased=true(enabled by default)