Skip to content
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: 2 comments 1 reply

Comment options

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

Answer selected by UbeyOzcan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
3 participants