Optional Query parameter list #7815
Replies: 3 comments
-
Not sure if you want the default to be |
Beta Was this translation helpful? Give feedback.
-
My apologies since we have the following note:
Therefore there is no problem on missing the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help here @phy25 ! 🙇♂️ Thanks for reporting back and closing the issue @jorgejesus 👍 |
Beta Was this translation helpful? Give feedback.
-
First check
Description
Documentation is very clear that we can use lists e,g
How can I:
Have an optional list structure, from the documentation we include the key word
None
e.g:
Meaning we can have two scenarios:
/q=a&q=b (q is present and item is in list)
/ (q is not present)
Tryied:
Query(None,["a","b","c","d"])
but it didnt workedAdditional context
Using
fastapi==0.49.0
Beta Was this translation helpful? Give feedback.
All reactions