Skip to content
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

bugfix (to master): after openapi specs comparison, all parameters are removed #454

Conversation

justinasbardauskas
Copy link
Contributor

@justinasbardauskas justinasbardauskas commented Jan 11, 2023

bugfix: after openapi specs comparison, all parameters are removed from new spec (right side) because of reused parameters list.

Issue affects 2.0.x and master branches.
Ports

…om new spec (right side) because of reused parameters list.

- updated code to use copy of given parameters list in diff method
- added few tests to cover this case
@gitpod-io
Copy link

gitpod-io bot commented Jan 11, 2023

@justinasbardauskas
Copy link
Contributor Author

joschi I found a bug where after comparison request parameters are removed from "new spec" OpenAPI object, because in the diff method list.remove(...) method was used on original list (method argument).
I created PR to master and 2.0.x branches.
Please review, thanks.

…d_from_new_spec

Conflicts:
	core/src/main/java/org/openapitools/openapidiff/core/compare/ParametersDiff.java
@joschi joschi added this to the 2.1.0 milestone Feb 26, 2023
@joschi joschi added the bug label Feb 26, 2023
Copy link
Contributor

@joschi joschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justinasbardauskas Thank you for this contribution! ❤️

@joschi joschi merged commit d6383f3 into OpenAPITools:master Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants