Skip to content
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

Improve openapi3filter HTTP Response Code Accuracy #479

Open
msvechla opened this issue Jan 25, 2022 · 2 comments
Open

Improve openapi3filter HTTP Response Code Accuracy #479

msvechla opened this issue Jan 25, 2022 · 2 comments

Comments

@msvechla
Copy link

Hi,

Currently, the request validation always returns 400 Bad Request as the HTTP response.
Would you be open to making the codes more configurable/accurate?

Especially in regards to the security authentication middleware, as 401 or 403 error codes would be a better fit for requests failing the validation by the AuthenticationFunc.

I would also be open to creating a PR if required.

Thanks a lot!

@msvechla
Copy link
Author

msvechla commented Feb 8, 2022

Do you have an update or opinion about this?

@fenollp
Copy link
Collaborator

fenollp commented Feb 9, 2022

Yes feel free to open a PR. Finer / more configurable error codes / responses is always welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants