Skip to content
Discussion options

You must be logged in to vote

One could argue this is a Swagger UI issue, but should an empty username or password really raise a RequestValidationError? This is an auth issue and should be handled in the auth layer of the app. So it's not really a validation issue.

I disagree here. Authorization issue is when you are trying to access protected endpoint without providing appropriate token. Then you should (and will) have 401 or 403 response.
But not providing login or password to login endpoint should cause request validation error.

I think everything works correctly here. The only thing that might be improved here is that Swagger could show clearer error message instead of Error: Unprocessable Entity (i'm talking a…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants