-
Notifications
You must be signed in to change notification settings - Fork 14
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
How to access parent data #130
Comments
Not in v4, I'm afraid. It's expected to be in v5, as per [this proposal](https://github.com/json-schema/json-schema/wiki/Extended-templating-syntax-(v5-proposal\)). It would be something like: {
"links": [
"href": {
"template": "/example{?e,b}",
"vars": {
"b": "3/b"
}
}
]
} In that example, The moment a proposal for v5 is released, I'll put this functionality into Jsonary. |
Thanks for the response. From: Geraint [mailto:notifications@github.com] Not in v4. It's expected to be in v5, as per this proposalhttps://github.com/json-schema/json-schema/wiki/Extended-templating-syntax-(v5-proposal). It would be something like: {
} In that example, "e" is treated as a plain variable name, but the value for "b" is resolved using a Relative JSON Pointer that says "go up three levels, then into the b property". The moment a proposal for v5 is released, I'll put this functionality into Jsonary. — |
Hello,
Given a JSON document like this:
Is there any way the URI template of a schema-described link on the items of array 'd' could reference the value of 'b'? For example I am thinking of a URI template like "/example{?e}&b={parent.parent.parent.b}" which on the first item in 'd' would come out to "/example?e=e1&b=bVal"
The text was updated successfully, but these errors were encountered: