mirror of https://github.com/tiangolo/fastapi.git
Update request body tutorial note to reference 3.10+ syntax
This commit is contained in:
parent
eef1b7d515
commit
d8cf0801f7
|
|
@ -206,7 +206,7 @@ The function parameters will be recognized as follows:
|
||||||
!!! note
|
!!! note
|
||||||
FastAPI will know that the value of `q` is not required because of the default value `= None`.
|
FastAPI will know that the value of `q` is not required because of the default value `= None`.
|
||||||
|
|
||||||
The `Union` in `Union[str, None]` is not used by FastAPI, but will allow your editor to give you better support and detect errors.
|
The `| None` in `q: str | None` is not used by FastAPI, but will allow your editor to give you better support and detect errors.
|
||||||
|
|
||||||
## Without Pydantic
|
## Without Pydantic
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue