-
Notifications
You must be signed in to change notification settings - Fork 160
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
#198: Fixing false positive breaking change reported when removing an optional field from a response #327
Conversation
…nal field from a response. Closes OpenAPITools#198
@@ -16,6 +16,6 @@ public void testDiffSame() { | |||
|
|||
@Test | |||
public void testDiffDifferent() { | |||
assertOpenApiBackwardIncompatible(OPENAPI_DOC1, OPENAPI_DOC2); | |||
assertOpenApiBackwardCompatible(OPENAPI_DOC1, OPENAPI_DOC2, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test actually covers the use case in #198, just has incorrect assertion.
@@ -19,6 +19,7 @@ components: | |||
schemas: | |||
B: | |||
type: object | |||
required: ["message2"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test RecursiveSchemaTest
expects backwards-incompatible change and by coincidence used removal of optional field from response as a change. Either the field should be required or the test should expect backwards-compatible change. I decided to go with the former.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @orange-buffalo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orange-buffalo LGTM, thanks for your contribution!
Fixes #198