Explanation
Defines the shape of the response data using Pydantic models
Examples
Specify response model
@app.post("/items/", response_model=Item)
def create_item(item: Item):
return item
Defines the shape of the response data using Pydantic models
Specify response model
@app.post("/items/", response_model=Item)
def create_item(item: Item):
return item