🐛 Fix support for extending openapi_extras with parameter lists#4267
Conversation
…llows query parameters to be specified in openapi_extras not be appended to the spec, not overwrite.
openapi_extras with parameter lists
|
Awesome, thanks for the contribution @orilevari! 🚀 🎉 |
Codecov Report
@@ Coverage Diff @@
## master #4267 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 534 535 +1
Lines 13811 13830 +19
=========================================
+ Hits 13811 13830 +19
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Is there a way to fall back to the old functionality somehow? 🤔 We have We might do |
Issue
When specifying parameters in openapi_extras for an endpoint, they will overwrite the existing query parameters with the extra parameters. This is due to deep_dict_update in utils.py overwriting list types rather than merging them together.
PR Content
This PR updates deep_dict_update to merge arrays instead of overwriting. I have also added a test case that demonstrates and verifies the desired behavior.
Testing
Ran bash scripts/test-cov-html.sh with 100% test pass including new test case