Skip to content

Conversation

@YuriiMotov
Copy link
Member

Specifying the return type annotation should be a default way to specify response model.
This PR updates code examples to specify response model as return type annotation where it's possible.

I checked that surrounding text doesn't refer to response_model and highlights didn't get broken

@YuriiMotov YuriiMotov added the docs Documentation about how to use FastAPI label Jan 21, 2026
@github-actions
Copy link
Contributor

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 21, 2026

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing use-return-type-annotation-instead-of-response_model-when-possible (838a5f8) with master (2eb978b)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (e0abd21) during the generation of this report, so 2eb978b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation about how to use FastAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants