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

No way to validate webhook requests #445

Closed
SethThoburn opened this issue Dec 13, 2022 · 2 comments · Fixed by #470
Closed

No way to validate webhook requests #445

SethThoburn opened this issue Dec 13, 2022 · 2 comments · Fixed by #470
Labels
kind/enhancement spec/3.1 Indicates an issue related with spec 3.1.

Comments

@SethThoburn
Copy link

When validating requests, the library finds the schema to validate with by looking at the request url. This doesn't work for webhooks however, since these don't have the url they are going to in the spec. It would be nice if you could pass a path to the spec validator to override whatever it infers from the request, that way you could provide the location of the webhook spec.

@p1c2u
Copy link
Collaborator

p1c2u commented Dec 20, 2022

Hi @SethThoburn

that's something I planned to do but first I need to make validators refactor. I added it to 0.17 roadmap.

@p1c2u p1c2u added kind/enhancement spec/3.1 Indicates an issue related with spec 3.1. labels Dec 20, 2022
@SethThoburn
Copy link
Author

Great, thanks. If anyone is looking for a workaround, I'm using the underlying openapi_schema_validator library to validate manually. You can pretty easily get the webhook schema by its name in your full spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement spec/3.1 Indicates an issue related with spec 3.1.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants