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

Fix: BUG#348 Parameter change detection fix when path doesn't change but PathParams AND Parameters are changed (But named the same) #353

Merged

Conversation

mishukdutta-toast
Copy link
Contributor

@mishukdutta-toast mishukdutta-toast commented Mar 11, 2022

  • When endpoint pathParams change and Parameter names are changed to be similar to pathParams
    • Don't remove parameters from the path
    • This allows the ChangedParameter class to not lose parameters and detect/return changes

Fixes: #353

OperationsDiff.java:
removePathParameters(context.getParameters(), params);

removes Parameters which are marked - in: path

So changes to the schema for those parameters are not detected anymore when
.getParametersDiff().diff(... is run after removal

@mishukdutta-toast mishukdutta-toast force-pushed the diff-schema-detection-fix branch 3 times, most recently from 3513668 to a2e94b8 Compare March 11, 2022 19:08
* When endpoint pathParams change and Parameter names are changed to be similar to pathParams
  - Don't remove parameters from the path
@mishukdutta-toast mishukdutta-toast changed the title Fix: BUG#348 Parameter change detection fix when pathparams AND Parameters s… Fix: BUG#348 Parameter change detection fix when path doesn't change but PathParams AND Parameters are changed (But named the same) Mar 11, 2022
@mishukdutta-toast
Copy link
Contributor Author

tagging @joschi for visibility

@joschi joschi added this to the 2.1.0 milestone Feb 25, 2023
@joschi joschi added the bug label Feb 25, 2023
Copy link
Collaborator

@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.

@mishukdutta-toast Thanks for your contribution! ❤️

@joschi joschi merged commit 5105f0b into OpenAPITools:master Feb 25, 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.

If path parameter names are changed, parameter schema changes do not trigger incompatibility
2 participants