-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
paginate decorator causes validation to fail #1011
Comments
Okay, I've removed the nested schemas and resolver and its still happening. I am now very confused why its specifically happening for this model/endpoint and not the others, which appear to be exactly the same (return |
I figured out why this is happening. It seems you cannot include an explicit response code when returning from the method. I think this should be probably allowed. I'll look into making a PR at some point |
from the apply pagination method
|
Indeed, I have no idea how to return 4xx error in function with @paginate decorator. It doesn't make sense if you can't raise it. Suppose I have a query parameter, that didn't pass validation and I have to return message with that detail. How can I do it? |
Ok, found solution here #940 (comment) |
I have used the
@paginate
decorator successfully multiple times now, but for some reason it is causing validation to fail on a new endpoint (that works without pagination). I have a feeling this is because of the schema, which has a nested schema and a resolved value, because that is the only real difference between it and the working ones. Am I missing something from the documentation or is there a known reason this is happening?Schema
Endpoint
Output
Any help would be nice, thanks!
The text was updated successfully, but these errors were encountered: