Skip to content

Fragments for schema+json media type: Need to add to IANA Considerations #144

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

Closed
handrews opened this issue Nov 16, 2016 · 5 comments
Closed
Assignees
Labels
clarification Items that need to be clarified in the specification Priority: Medium
Milestone

Comments

@handrews
Copy link
Contributor

Currently the section on "id" (or "$id" if the recent PR goes through) shows the keyword being used to define simple one-word fragment identifiers such as {"id": "#bar"}, while also showing the use of fragments with JSON Pointer such as "#/definitions/B".

What are the official rules for fragments for the application/schema+json media type? Do we want to standardize on JSON Pointers? Or do we support both of this by saying that if the fragment begins with a "/" then it should be interpreted as a JSON Pointer, but otherwise it should be looked up as an "id"? Defining an "id" that appears to be a JSON Pointer but does not point to the current schema would either have an undefined effect or produce an error, presumably.

@awwright I know we were talking about fragments for the media type but I don't recall exactly what, if anything, we decided to do. I just remember being confused about whether JSON Pointers were generally the fragment type for application/json (for everyone else: no, they aren't, the JSON Pointer specification says so directly).

@handrews
Copy link
Contributor Author

Reading up on http://www.w3.org/TR/fragid-best-practices/ and looking at how application/xml and application/*+xml fragments are defined in https://tools.ietf.org/html/rfc7303 it seems clear that having both of these fragment identifier styles should be just fine (although I still need to do a bit more reading).

Assuming I don't find anything to the contrary, I will write up a PR adding a formal fragment identifier specification for application/schema+json.

@awwright
Copy link
Member

It's something we'll have to build out in the IANA Considerations section.

In the absence of a section describing fragment interpretation for application/schema+json, implementations should be reading the fragment as a JSON Pointer.

@handrews
Copy link
Contributor Author

Based on the best practices doc and what I see in the XML RFC and others, it shouldn't be too hard to write this up so I'll give it a shot. We do not need to define any new fragid structures as we are just using plain name fragids in a way that is completely consistent with their use elsewhere, and we're using JSON Pointer which is already a standard which addresses its own use as a fragid structure.

@handrews handrews changed the title Fragments for schema+json media type: do we currently have two? Fragments for schema+json media type: Need to add to IANA Considerations Nov 18, 2016
@handrews handrews self-assigned this Dec 24, 2016
@handrews
Copy link
Contributor Author

Addressed by PR #245

@handrews handrews added this to the draft-next (draft-6) milestone Feb 19, 2017
@handrews
Copy link
Contributor Author

PR #245 merged. While there may be more details to address in the IANA registration, this gets us where we need to be for now.

@ghost ghost removed the Status: In Progress label Feb 28, 2017
@gregsdennis gregsdennis added clarification Items that need to be clarified in the specification and removed Type: Maintenance labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Items that need to be clarified in the specification Priority: Medium
Projects
None yet
Development

No branches or pull requests

3 participants