- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ItemV2 (0.03 sec)
-
docs/de/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *} Im obigen Beispiel ist das Eingabemodell ein Pydantic‑v1‑Modell, und das Ausgabemodell (definiert in `response_model=ItemV2`) ist ein Pydantic‑v2‑Modell. ### Pydantic v1 Parameter { #pydantic-v1-parameters }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 6.3K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
return item def dependency(item2: Item): return item2 def sub_duplicate_dependency( item: Item, sub_item: Item = Depends(duplicate_dependency) ): return [item, sub_item] @app.post("/with-duplicates") async def with_duplicates(item: Item, item2: Item = Depends(duplicate_dependency)): return [item, item2] @app.post("/no-duplicates")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
item_id: str = Path( examples=["item_1", "item_2"], ), ): return item_id with pytest.warns(FastAPIDeprecationWarning): @app.get("/path_example_examples/{item_id}") def path_example_examples( item_id: str = Path( example="item_overridden", examples=["item_1", "item_2"], ), ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 32.2K bytes - Viewed (0) -
tests/test_openapi_examples.py
"summary": "Path One Summary", "description": "Path One Description", "value": "item_1", }, "Path Two": { "value": "item_2", }, }, ), ): return item_id @app.get("/query_examples/") def query_examples( data: Union[str, None] = Query( default=None, examples=[
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.1K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial003.py
assert response.json() == { "description": "All my friends drive a low rider", "type": "car", } def test_get_plane(client: TestClient): response = client.get("/items/item2") assert response.status_code == 200, response.text assert response.json() == { "description": "Music is my aeroplane, it's my aeroplane", "type": "plane", "size": 5, }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: str | None = None class ItemV2(BaseModelV2): title: str summary: str | None = None app = FastAPI() @app.post("/items/", response_model=ItemV2) def create_item(item: Item): return {"title": item.name, "summary": item.description} ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:06:15 UTC 2025 - 586.7K bytes - Viewed (0)