-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
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
Issue with file upload request schema validation #89
Comments
Hey, I had a similar type error which I fixed by using the word 'data' as the function parameter name. I'm a complete noob so this might be a long shot but it's worth trying. Replace
With
|
That is not it, unfortuanetly. It's also just a parameter name, so would really suprise me. |
I see what the problem is. When using a validation decorator like @validate_request or @validate_querystring, quart-schema returns specific arguments to your route function, (data for validate_request and query_args for validate_querysting). All you have to do it annotate your route function with the appropriate arg and type and you're good to go.
Your code can then be rewritten as above. |
Hello.
I'm trying to add schema validation to an upload file endpoint. It looks as follows:
When I try to invoke it using the following request:
I get the following error:
Seems like it could be a bug, or am I missing something.
The package versions are:
quart==0.19.6
quart-schema[pydantic]==0.20.0
Hopefully it's not me having a brainfart.
BR,
Niels
The text was updated successfully, but these errors were encountered: