Skip to content

Query parameter list / multiple values : Endpoint works but the Swagger docs not updated as expected #11494

Answered by YuriiMotov
UbeyOzcan asked this question in Questions
Discussion options

You must be logged in to vote

It's a well-known issue. Use SkipJsonSchema[None] instead of None in type annotation:

async def read_items(q: Annotated[list[str] | SkipJsonSchema[None], Query()] = None):

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@UbeyOzcan
Comment options

Answer selected by UbeyOzcan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants