🐛 Fix custom response input output schema bug
This PR addresses the issue (point 1.) from https://github.com/tiangolo/fastapi/discussions/10697
Add missing mode argument when calling create_response_field
for "custom" response models defined in the responses option of a route.
The same way we do that for the "main" response model on line 475.
Otherwise that custom response model schema (if separate i/o models are enabled)
is generated with the "-Input" suffix (instead of -Output).
NOTE this PR doesn't address docs issues that are mentioned in https://github.com/tiangolo/fastapi/discussions/10697 (point 2.)
@alejsdev any chance on approving/merging this? 😬
Hi @slafs, thank you for your interest in contributing to FastAPI. We have a high volume of PRs, we're reviewing and classifying them. We'll come back to review your PR in detail, we appreciate your patience as we manage the queue. :bowing_woman:
Seems like a duplicate of #10895. Would love to see any of PRs the merged. :)
Oh yeah. Cool. Although, I feel my test is more explicit about the custom responses bug.
Thanks @svlandeg!
Is there anything I can do regarding the documentation issue mentioned in https://github.com/fastapi/fastapi/discussions/10697 (point 2.)?