We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
flask-pydantic==0.10.0 flask==2.1.2
class QueryModel(BaseModel): order_by: Optional[ List[Literal["created", "name"]] ] = Field(..., alias="order-by") class Config: allow_population_by_field_name = True
query: QueryModel
?order-by=name
query.order_by
['name']
{ "validation_error": { "query_params": [ { "loc": [ "order-by" ], "msg": "value is not a valid list", "type": "type_error.list" } ] } }
In short:
?order_by=name&order_by=created
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Steps to reproduce
query: QueryModel
in your request handler function signature.?order-by=name
Expected result
query.order_by
should be a list['name']
.Actual result
In short:
?order_by=name&order_by=created
gives you list with these values).The text was updated successfully, but these errors were encountered: