Description
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).