mirror of
https://github.com/fastapi/fastapi.git
synced 2026-10-13 09:28:52 -04:00
📝 Use return type annotation instead of response_model when possible (#14753)
This commit is contained in:
1 parent
f6ba0141f4
commit
741c7345ea
27 files changed
+50
-54
No files matched your search
@@ -52,7 +52,7 @@ In these cases, it could make sense to store the tags in an `Enum`.
|
||||
|
||||
You can add a `summary` and `description`:
|
||||
|
||||
{* ../../docs_src/path_operation_configuration/tutorial003_py310.py hl[18:19] *}
|
||||
{* ../../docs_src/path_operation_configuration/tutorial003_py310.py hl[17:18] *}
|
||||
|
||||
## Description from docstring { #description-from-docstring }
|
||||
|
||||
@@ -70,7 +70,7 @@ It will be used in the interactive docs:
|
||||
|
||||
You can specify the response description with the parameter `response_description`:
|
||||
|
||||
{* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[19] *}
|
||||
{* ../../docs_src/path_operation_configuration/tutorial005_py310.py hl[18] *}
|
||||
|
||||
/// info
|
||||
|
||||
|
||||
Reference in new issue
Block a user