This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Specifying parameters in openapi_extras overrides query parameters, rather than appending them #4268
Closed
9 tasks done
Labels
First Check
Commit to Help
Example Code
See the PR I opened with a fix: #4267 It includes a test case that describes the use case.
Description
When specifying parameters in openapi_extras for an endpoint, they will overwrite the existing query parameters with the extra parameters, rather than appending the parameters to the spec. This is due to deep_dict_update in utils.py overwriting list types rather than merging them together.
I have created a PR already which has a fix and adds a test case: #4267
These updates change the behavior to merge parameters together rather than overwriting.
If y'all agree that this seems like a bug, I'd appreciate a review on the PR. Thanks in advance! 😄
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.70.0
Python Version
Python 3.9.7
Additional Context
No response
The text was updated successfully, but these errors were encountered: