@ -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 }
@ -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
@ -16,9 +16,8 @@ class Item(BaseModel):