-
Notifications
You must be signed in to change notification settings - Fork 3
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
support validating requests, responses against callbacks and webhooks - split up find_path usecases #74
Comments
This will make it possible to call |
In version 0.068, it is now possible to call However, callback requests and webhook requests are not yet recognized by
|
Currently (version 0.074), we can handle validating responses for webhooks and callbacks by specifying the operationId. However, if we want to validate a request, we always attempt to match the request URI against all We can handle validating requests if:
For webhooks specifically, if the openapi specification was modified such that For callbacks, it's more complicated as there is still an associated /paths api request/response associated, and we could be deep in the callback chain. Defer until later! |
Most of the request and response validation can be applied equally well to descriptions in callbacks and webhooks -- just the initial bit where we take the request and call
find_path
on it to match the request URI against entries in/paths/{path description}
doesn't apply here.So, pull out the meat of the validation into separate subs which are called by multiple entry points - some of which would not require a path template for matching (instead, the inner sub takes the path-item location, which could be calculated by
find_path
or could be supplied directly, e.g. by an earlier call ofvalidate_request
that is processing a callback section.The text was updated successfully, but these errors were encountered: