Skip to content

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

Merged
joschi merged 2 commits into
OpenAPITools:masterfrom
mishukdutta-toast:diff-schema-detection-fix
Feb 25, 2023
Merged

Fix: BUG#348 Parameter change detection fix when path doesn't change but PathParams AND Parameters are changed (But named the same)#353
joschi merged 2 commits into
OpenAPITools:masterfrom
mishukdutta-toast:diff-schema-detection-fix

Conversation

@mishukdutta-toast

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

Copy link
Copy Markdown
Contributor
  • 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 force-pushed the diff-schema-detection-fix branch from a2e94b8 to 917f857 Compare March 11, 2022 19:11
@mishukdutta-toast mishukdutta-toast changed the title Fix: BUG#348 Parameter change detection fix when pathparams AND Parameters s… Mar 11, 2022
@mishukdutta-toast

Copy link
Copy Markdown
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

@joschi joschi left a comment

Copy link
Copy Markdown
Contributor

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! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants