Browse Source

Update `docs_src/path_operation_configuration/tutorial003_*`

pull/14753/head
Yurii Motov 6 months ago
parent
commit
47d099d9bb
  1. 2
      docs/en/docs/tutorial/path-operation-configuration.md
  2. 3
      docs_src/path_operation_configuration/tutorial003_py310.py
  3. 3
      docs_src/path_operation_configuration/tutorial003_py39.py

2
docs/en/docs/tutorial/path-operation-configuration.md

@ -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 }

3
docs_src/path_operation_configuration/tutorial003_py310.py

@ -14,9 +14,8 @@ class Item(BaseModel):
@app.post(
"/items/",
response_model=Item,
summary="Create an item",
description="Create an item with all the information, name, description, price, tax and a set of unique tags",
)
async def create_item(item: Item):
async def create_item(item: Item) -> Item:
return item

3
docs_src/path_operation_configuration/tutorial003_py39.py

@ -16,9 +16,8 @@ class Item(BaseModel):
@app.post(
"/items/",
response_model=Item,
summary="Create an item",
description="Create an item with all the information, name, description, price, tax and a set of unique tags",
)
async def create_item(item: Item):
async def create_item(item: Item) -> Item:
return item

Loading…
Cancel
Save