🐛 Fix openapi generation with responses kwarg#10895
🐛 Fix openapi generation with responses kwarg#10895tiangolo merged 10 commits intofastapi:masterfrom
Conversation
73235ab to
c166a96
Compare
684ae92 to
b5d733e
Compare
YuriiMotov
left a comment
There was a problem hiding this comment.
I've just checked that the problem is still relevant in FastAPI v. 0.109.2 (Pydantic 2.6.0).
This PR fixes this problem.
Code is nice
|
I am also affected by this issue. Is this PR ready to be merged? |
From my point of view, it is. @tiangolo is there anything else you need me to do here? |
|
Seems like this is ready to be merged. Is there any update on when this will happen? Thanks in advance. |
|
Hi @flxdot, thanks for your interest in contributing to FastAPI. We're aware of your PR and we'll come back to review it in detail soon. Thanks for your patience 🙏 |
There was a problem hiding this comment.
Hi @flxdot,
Thanks for the contribution, and apologies for the delay in reviewing this!
Thanks all for the review and comments as well!
I could reproduce the bug on master and confirm that the test fails on master and succeeds with this PR. I've also pushed a related test from #11517 to this PR, as both PRs include the same fix but tested slightly differently.
This PR was submitted earlier, so I suggest we merge this one and close the other. Either way, I'll leave the final decision with Tiangolo.
Thanks again!
|
Great, thank you @flxdot! 🚀 🍰 And thanks for the help and reviews @YuriiMotov, @svlandeg, @alejsdev 🙇 This will be available in FastAPI |
Co-authored-by: flxdot <felix.fanghaenel@nitrex.com> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> Co-authored-by: Sławek Ehlert <slawomir.ehlert@gmail.com>
This PR fixes a bug where the schema of response models defined via the
responseskeyword where generated asvalidationschema instead ofserializationschema.Additional discussions for that topic: