-
Notifications
You must be signed in to change notification settings - Fork 60
feat(spec): Add support for JSONPath and XPath where JSONPointer is supported #409
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
base: v1.1-dev
Are you sure you want to change the base?
feat(spec): Add support for JSONPath and XPath where JSONPointer is supported #409
Conversation
kevinduffey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.. I left one comment regarding regex.. there are 2 places that would apply I left it in just the one. If what is there is fine I'm good with that. Wasn't sure so thought I'd leave a "verify this is ok" comment. As such I'll 'request change' but feel free to ignore if its ok and then accept this as Approve.
| "name": "userId", | ||
| "in": "query", | ||
| "value": { | ||
| "expression": "$inputs.user", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a bit confusing for users. There will be two different ways to describe similar things.
There is already the context, but this PR also suggests expression. Maybe I misunderstood, but it seems to perform a similar role and set the context for the condition.
And selector is similar to condition, maybe without expressions.
"context": "$response.body",
"condition": "/Envelope/Status[text()='OK']",
"type": {
"type": "xpath",
"version": "xpath-31"
}
Were you considering reusing already described Criterion Object as Selector Object?
fixes: #366
Spec changes:
Expression Type Object
This replaces the previously named
Criterion Expression Type Objectand will be reused for both:Allowed type/version values remain:
jsonpathrfc9535,draft-goessner-dispatch-jsonpath-00rfc9535xpathxpath-31,xpath-30,xpath-20,xpath-10xpath-31jsonpointerrfc6901Just adding for completenessrfc6901Selector Object
Introduce a
Selector Object, that can be used wherever more complex expressions than what's covered by the Arazzo ABNF grammer against structured data are required.Examples of usage:
RequestBody example:
Places supporting
{expression}for value setting have been extended to support the Selector Object.Schema Updates
JSON Schema updated in line with spec changes