Description
@handrews do correct me if I am wrong in any of the cases 😆
- Should always produce a valid JSON document (resolving referenced resource should always be compatible with JSON)
- Should define the behavior for referencing non-JSON resources in a JSON document (this can be as simple as resolving the content into a string value)
- Should define the behavior for referencing JSON data
Same as JRef, this is decided per media type, and explicitly allow the context specification to determine the behavior, any of the above use-cases seem to be covered.
- Should define the behavior for referencing JSON data that also have reference behavior, and how they interconnect / or not (say two standards both use
$ref
the new standard should define a clear separation between the two and how referencing tools should interpret it)
https://github.com/json-schema-org/referencing/blob/main/draft-handrews-jri.md#extending-jri-extending
https://github.com/json-schema-org/referencing/blob/main/draft-handrews-jri.md#standalone-jri-implementations
https://github.com/json-schema-org/referencing/blob/main/draft-handrews-jri.md#avoiding-behavioral-overlap
Everything is context aware, and is dynamic based on media type, i.e. resolving references in a JSON Schema context follows different rules for $ref
then in the context specification of JRI.
- Should define the behavior of nested schemas within the same file (so there is no difference between what the spec allows and what tooling enables)
https://github.com/json-schema-org/referencing/blob/main/draft-handrews-jri.md#fragments-and-secondary-resources defines the behavior for fragments and secondary resources.
https://github.com/json-schema-org/referencing/blob/main/draft-handrews-jri.md#discovering-caching-and-serving-resources-serving defines the behavior for caching and bundling.
Context specifications take priority, which clears up the confusion.