Replies: 2 comments 1 reply
-
Hello @MCR2019! Thanks for always bringing up interesting points about our OpenAPI schema support. This code should be something like this, but I get a 422 when trying to pass the same parameter multiple times to create the multiValue. @rubenfonseca we need your help here. @app.get("/example-resource")
def get(
example_multi_value_param: Annotated[
List[ExampleEnum],
Query(
description="This should be a multi value query parameter."
), # TODO: How should this represent multi-value query string parameters?
]
):
"""Return validated multi-value param values."""
return {"return": example_multi_value_param} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Please open a bug report on this one, we need to fix this use case. Thank you for reporting this! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When an event from APIGatway contains a path parameter or query parameter these can be specified and validated using
aws_lambda_powertools.event_handler.openapi.params
Path
andQuery
(and the openAPI spec generated).If an event contains
multiValueQueryStringParameters
then I cannot see any way to specify, validate and access these? (and have them generated for the openAPI spec).I've been unable to find anything in the documentation or code or get anything to work.
The following code is a starting point to demonstrate what I'm looking for (it doesn't work as I have used
Query
rather than something to specify multi value query parameters).I'd be interested in any thoughts on this :)
Beta Was this translation helpful? Give feedback.
All reactions