Skip to content

Add "anchorPointer" for in-instance contexts #385

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 4 commits into from
Sep 14, 2017

Conversation

handrews
Copy link
Contributor

@handrews handrews commented Aug 31, 2017

This will need a bit more work after "anchor" (#352) is merged in,
as the improved wording about what the default context is
is all in that other PR. But the key points are well enough
developed for review.

In the interst of getting the main points out for review, I
referenced the long-expired Relative JSON Pointer I-D. Maybe
that's OK since this is not even a working group document yet,
or we can talk about how to either move the relevant parts in,
or re-submit that I-D ourselves as well.

This goes along with "hrefPointers" ( #386 ), which adjusts template
variable resolution in the same way that this keyword adjusts
context location.

@handrews handrews added this to the draft-07 (wright-*-02) milestone Aug 31, 2017
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.

Looks promising. I'll come back later for a second reading and validation.

Spotted a few typos.

"properties": {
"name": {"type": "string"}
}
}},
Copy link
Member

Choose a reason for hiding this comment

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

extra }

"id": {"type": "integer"}
},
"links": [{
"rel": "item"
Copy link
Member

Choose a reason for hiding this comment

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

missing trailing ,

}]]>
</artwork>
<postamble>
The default context for the the link to "/example/1234" is the first
Copy link
Member

Choose a reason for hiding this comment

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

"the the"

Copy link
Member

Choose a reason for hiding this comment

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

Also, it should be "/examples/1234" I guess (same below).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup, correct on all accounts. Should be fixed now.

@handrews
Copy link
Contributor Author

handrews commented Sep 2, 2017

The updated commit is just rebased to resolve conflicts after merging "anchor", and squashed the typo fixes into the commit since they have been reviewed separately already.

There are no changes whatsoever to the overall contents of the PR.

@handrews
Copy link
Contributor Author

handrews commented Sep 2, 2017

The additional commit pushed just now makes minor changes since "anchor" has now been merged, and this keyword builds on that concept.

@dlax
Copy link
Member

dlax commented Sep 3, 2017

@handrews We should add the new keyword to the meta-schema, I guess?

@handrews
Copy link
Contributor Author

handrews commented Sep 3, 2017

We should add the new keyword to the meta-schema, I guess?

Oops- that was one of the post-"anchor"-merge fixups I was going to do, otherwise they would conflict as I'd put them in the same place. Will update momentarily.

This will need a bit more work after "anchor" is merged in,
as the improved wording about what the default context is
is all in that other PR.  But the key points are well enough
developed for review.

In the interst of getting the main points out for review, I
referenced the long-expired Relative JSON Pointer I-D.  Maybe
that's OK since this is not even a working group document yet,
or we can talk about how to either move the relevant parts in,
or re-submit that I-D ourselves as well.

This goes along with "hrefPointers", which adjusts template
variable resolution in the same way that this keyword adjusts
context location.
Now that "anchor" has been merged, there are a few points where
its text and that of the "anchorPointer" proposal needed adjusting
to fit with each other properly.
Also align the wording around JSON Pointers and Relative JSON Pointers
with the wording in the "hrefPointers" specification.
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