Commit Graph

3 Commits

Author SHA1 Message Date
Bharathis28 e0391ac7b5 Update Pydantic example in tutorial to Pydantic v2 syntax
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.
2025-12-01 11:07:17 +05:30
Andrey Otto e9ffa20c8e
📝 Update code examples in docs for body, replace name `create_item` with `update_item` when appropriate (#5913) 2024-01-09 18:28:58 +04:00
Sebastián Ramírez d08a062ee2
Add docs and tests for Python 3.9 and Python 3.10 (#3712)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-01-07 15:11:31 +01:00