Sync fastapi docs from 50fa3f7c on 2026-01-11

This commit is contained in:
The Librarian
2026-01-11 04:00:07 +00:00
parent a42b1ff04e
commit 95d1a394e6
1611 changed files with 12193 additions and 123004 deletions
View File
-22
View File
@@ -1,22 +0,0 @@
from typing import Union
from fastapi import Body, FastAPI
from pydantic import BaseModel, Field
from typing_extensions import Annotated
app = FastAPI()
class Item(BaseModel):
name: str
description: Union[str, None] = Field(
default=None, title="The description of the item", max_length=300
)
price: float = Field(gt=0, description="The price must be greater than zero")
tax: Union[float, None] = None
@app.put("/items/{item_id}")
async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
results = {"item_id": item_id, "item": item}
return results