Browse Source

Update `docs_src/path_operation_configuration/tutorial005_*`

pull/14753/head
Yurii Motov 6 months ago
parent
commit
193939f43b
  1. 2
      docs/en/docs/tutorial/path-operation-configuration.md
  2. 3
      docs_src/path_operation_configuration/tutorial005_py310.py
  3. 3
      docs_src/path_operation_configuration/tutorial005_py39.py

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

@ -70,7 +70,7 @@ It will be used in the interactive docs:
You can specify the response description with the parameter `response_description`: 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 /// info

3
docs_src/path_operation_configuration/tutorial005_py310.py

@ -14,11 +14,10 @@ class Item(BaseModel):
@app.post( @app.post(
"/items/", "/items/",
response_model=Item,
summary="Create an item", summary="Create an item",
response_description="The created item", response_description="The created item",
) )
async def create_item(item: Item): async def create_item(item: Item) -> Item:
""" """
Create an item with all the information: Create an item with all the information:

3
docs_src/path_operation_configuration/tutorial005_py39.py

@ -16,11 +16,10 @@ class Item(BaseModel):
@app.post( @app.post(
"/items/", "/items/",
response_model=Item,
summary="Create an item", summary="Create an item",
response_description="The created item", response_description="The created item",
) )
async def create_item(item: Item): async def create_item(item: Item) -> Item:
""" """
Create an item with all the information: Create an item with all the information:

Loading…
Cancel
Save