mirror of https://github.com/tiangolo/fastapi.git
Update query params tutorial note to reference 3.10+ syntax
This commit is contained in:
parent
d8cf0801f7
commit
199ddfc2f6
|
|
@ -21,7 +21,7 @@ The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python
|
|||
!!! note
|
||||
FastAPI will know that the value of `q` is not required because of the default value `= None`.
|
||||
|
||||
The `Union` in `Union[str, None]` 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.
|
||||
|
||||
## Additional validation
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue