Skip to content

Example using "anchor", "base", "templatePointers" #458

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

Merged
merged 2 commits into from
Oct 30, 2017

Conversation

handrews
Copy link
Contributor

NOTE: This is not the same tree example as before the rewrite

It also shows why "rev" is not necessary (it is deprecated in
other link specifications, so it is omitted here), and how
to use both absolute and relative JSON Pointers in
"templatePointers".

Also fix typos and margins and stuff.

Copy link
Member

@dlax dlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

The following hyper-schema, applied to the instance in the response
above, would produce the same "self" link and "up" link with "anchor".
It also shows the use of a templated "base" URI, plus both absolute
and relative JSON Pointers in "tempatePointers".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: tempatePointers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blerg. Spell check does not understand camelCase. Thanks.

"id": {"type": "integer"},
"treeId": {"type": "integer"},
"childIds": {
"items": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing "type": "array" in childIds, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, technically necessary for it to behave in an intuitive way, although I think folks can get the idea without it. But better to avoid confusion.

It also shows why "rev" is not necessary (it is deprecated in
other link specifications, so it is omitted here), and how
to use both absolute and relative JSON Pointers in
"templatePointers".
The long lines basically worked but caused warnings.
@handrews handrews merged commit d163932 into json-schema-org:master Oct 30, 2017
@handrews handrews deleted the up-down branch October 31, 2017 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants