mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-12 13:36:41 +00:00
📝 Add note about Python 3.10 X | Y operator in explanation about Response Models (#5307)
This commit is contained in:
parent
198b7ef2cb
commit
ae369d879a
1 changed files with 1 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ Your response model could have default values, like:
|
||||||
{!> ../../../docs_src/response_model/tutorial004_py310.py!}
|
{!> ../../../docs_src/response_model/tutorial004_py310.py!}
|
||||||
```
|
```
|
||||||
|
|
||||||
* `description: Union[str, None] = None` has a default of `None`.
|
* `description: Union[str, None] = None` (or `str | None = None` in Python 3.10) has a default of `None`.
|
||||||
* `tax: float = 10.5` has a default of `10.5`.
|
* `tax: float = 10.5` has a default of `10.5`.
|
||||||
* `tags: List[str] = []` as a default of an empty list: `[]`.
|
* `tags: List[str] = []` as a default of an empty list: `[]`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue