On the responses field in the route decorator we can't override the description of the successful response. Even on the tutorial we can see it: https://fastapi.tiangolo.com/advanced/additional-responses/


We should have "Item requested by ID" in the description field for the code 200.
We can use response_description, but we can't override with responses so the BUG still remains.
Hey i would like to contribute and perhaps some mentorship. This would be my first contribution to open source
@fabrizzioalco that's great!
You should probably:
@tiangolo if there has not been any PRs yet, i have been thinking of looking into contributing to this issue. what do you think?
@rkbeatss I can say that there are no PRs solving it for now, I think you can safely work on it :)
Please, be my guest. I had some troubles so i can't work on this @rkbeatss
Later i would contribute on something else
Thanks for the report and for the discussion here everyone! :coffee:
And thanks @rkbeatss for the initial implementation! :cake:
This should be fixed in https://github.com/tiangolo/fastapi/pull/1577
Available in FastAPI version 0.58.0 :tada:
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.
Wow, this is fantastic - I literally just ran into this bug (was on 0.54) so I was really excited to see it fixed. I couldn't use response_model in one of my handlers because the response was large as raw data, and serializing it to pydantic classes increased response time by like 4x. Being able to skip runtime validation but still have documentation is just wonderful.
@tiangolo Side note: Thanks for including the version number that included the bug fix. As a busy, busy dev it makes my life much easier knowing immediately what version to bump to, so that was really appreciated.
Most helpful comment
@tiangolo Side note: Thanks for including the version number that included the bug fix. As a busy, busy dev it makes my life much easier knowing immediately what version to bump to, so that was really appreciated.