diff --git a/hyper-schema.json b/hyper-schema.json index 84249f01..9b5aca9e 100644 --- a/hyper-schema.json +++ b/hyper-schema.json @@ -29,6 +29,11 @@ "description": "relation to the target resource of the link", "type": "string" }, + "anchor": { + "description": "the URI of the context resource", + "type": "string", + "format": "uri-reference" + }, "title": { "description": "a title for the link", "type": "string" diff --git a/jsonschema-hyperschema.xml b/jsonschema-hyperschema.xml index ff85c4dd..8bd83878 100644 --- a/jsonschema-hyperschema.xml +++ b/jsonschema-hyperschema.xml @@ -752,14 +752,28 @@ - The relation to the target is interpreted as from the instance that the schema - (or sub-schema) applies to, not any larger document that the instance may have - been found in. + As defined by RFC 5988, a link connects a context resource + to a target resource, where the nature of the connection + is described by the link relation type. The context + resource is the instance to which the schema (or sub-schema) + applies, rather than any larger document in which the + instance may have been found. The context may be changed + with the "anchor" property. - Relationship definitions are not normally media type dependent, and users are - encouraged to utilize existing accepted relation definitions. + Depending on the media type of the instance, it may or may + not be possible to assign a URI to the exact default context + resource. In particular, application/json does not define + URI fragment resolution semantics, so properties or array + elements within a plain JSON document cannot be identified + by a URI. + + + + Relationship definitions are not normally media type + dependent, and users are encouraged to utilize existing + accepted relation definitions.
@@ -874,6 +888,15 @@ GET /foo/ +
+ + This property sets the context URI of the link. + The value of the property MUST be resolved as a + URI-reference against + the base URI of the instance. + +
+
This property defines a title for the link.