New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs with parameters that default to None to use Optional #1561
Labels
Comments
|
I'll be working on this with @chrisngyn and @YKo20010 |
|
Thanks a lot! |
|
@tiangolo Is this available to take up? |
|
@tiangolo is this fixed or do you want someone to take it up a quick search through the docs makes it look all solved? |
Merged
|
This issue was solved on #1644 To confirm I've made a quick search and the docs are following the request on this issue. |
|
Is this still up for grabs? @tiangolo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


First check
Example
Here's a self-contained minimal, reproducible, example with my use case:
Description
qcan beNoneand thatq.lower()could raise an error.The solution you would like
I would like the examples in the docs to use
Optional:By using
Optionalthe editor would be able to warn thatq.lower()could raise an error ifqisNone.Describe alternatives you've considered
To leave it as is.
Environment
To know the FastAPI version use:
python -c "import fastapi; print(fastapi.__version__)"To know the Python version use:
Additional context
I was waiting to first introduce🎉
Optionalin the docs, but it was done in #1377The new docs are here: https://fastapi.tiangolo.com/python-types/#optional
Now it's a good moment to update all the examples that have a default of
Nonein all the docs to also useOptional.The text was updated successfully, but these errors were encountered: