Right now we use relative refs to $defs within the same schema, and absolute URIs for references to external $defs. It should be possible to use relative references also between individual JSON Schema files.
A relative URI for this case would be: “$ref”: “../../b/schema.json”.
There may be advantages and disadvantages to using relative URIs vs. absolute URIs to external schema definitions.
Should we extend the specification (section 7.3.1, in or below requirement “/req/core/schema-references”), to explain the shape of external references in more detail? We can certainly state that it is up to the encoder to use absolute or relative URIs in such cases – as long as the result is the same, when converting a relative URI to an absolute URI, using the base URI defined by the schema $id.
In any case, requirement "/req/core/property-inline", Part B should be clarified. Relative references should be allowed, especially in-document references using #... notation.
Right now we use relative refs to $defs within the same schema, and absolute URIs for references to external $defs. It should be possible to use relative references also between individual JSON Schema files.
Example:
There may be advantages and disadvantages to using relative URIs vs. absolute URIs to external schema definitions.
Should we extend the specification (section 7.3.1, in or below requirement “/req/core/schema-references”), to explain the shape of external references in more detail? We can certainly state that it is up to the encoder to use absolute or relative URIs in such cases – as long as the result is the same, when converting a relative URI to an absolute URI, using the base URI defined by the schema $id.
In any case, requirement "/req/core/property-inline", Part B should be clarified. Relative references should be allowed, especially in-document references using #... notation.