mirror of https://github.com/tiangolo/fastapi.git
This PR updates outdated code examples in body tutorial docs that still used Pydantic v1 patterns. Updated to Pydantic v2 syntax including: - Replacing `.dict()` with `.model_dump()` - Maintaining Python 3.10+ union types (`str | None`) This ensures documentation is consistent with current FastAPI + Pydantic v2 behavior. |
||
|---|---|---|
| .. | ||
| tutorial001.py | ||
| tutorial001_py310.py | ||
| tutorial002.py | ||
| tutorial002_py310.py | ||
| tutorial003.py | ||
| tutorial003_py310.py | ||
| tutorial004.py | ||
| tutorial004_py310.py | ||