diff --git a/spec/latest/core/core.jsonld b/spec/latest/core/core.jsonld index 2061ec9..cb73c56 100644 --- a/spec/latest/core/core.jsonld +++ b/spec/latest/core/core.jsonld @@ -544,6 +544,36 @@ "range": "xsd:string", "vs:term_status": "testing" }, + { + "@id": "hydra:resolveRelativeUsing", + "@type": "rdf:Property", + "label": "relative Uri resolution", + "domain": "hydra:IriTemplate", + "range": "hydra:BaseUriSource", + "vs:term_status": "testing" + }, + { + "@id": "hydra:BaseUriSource", + "@type": "hydra:Class", + "subClassOf": "hydra:Resource", + "label": "Base Uri source", + "comment": "Provides a base abstract for base Uri source for Iri template resolution.", + "vs:term_status": "testing" + }, + { + "@id": "hydra:Rfc3986", + "@type": "hydra:BaseUriSource", + "label": "RFC 3986 based", + "comment": "States that the base Uri should be established using RFC 3986 reference resolution algorithm specified in section 5.", + "vs:term_status": "testing" + }, + { + "@id": "hydra:LinkContext", + "@type": "hydra:BaseUriSource", + "label": "Link context", + "comment": "States that the link's context IRI, as defined in RFC 5988, should be used as the base Uri", + "vs:term_status": "testing" + }, { "@id": "hydra:offset", "@type": "rdf:Property", diff --git a/spec/latest/core/index.html b/spec/latest/core/index.html index e8a40f4..aeea8f1 100644 --- a/spec/latest/core/index.html +++ b/spec/latest/core/index.html @@ -1166,7 +1166,43 @@

Templated Links

  • resource http://api.example.com/events should not have an Iri template exposed as there are no additional details available, neither in the initial resources' payload nor in the API documentation.
  • - + +

    IRI expansion should be performed with respect to the specification + behind the IRI template type (RFC 6570 by default), and the product + of this process SHOULD be an IRI. When the produced IRI is relative, + a case client SHOULD stick to RFC 3986 sections 5.1.3 and 5.1.4 to be compatible + with most RDF serializations that support relative IRIs. Still, it may be + preferred to use another base URI for the expansion process, which + makes a resolveRelativeTo term useful. It allows to switch the + IRI template expansion algorithm so the base URI is established using + current link context, which is a subject of the relation pointing to an + IriTemplate instance. In case that subject is a relative URI, + default behavior SHOULD be used as fallback.

    + +

    The example below allows to make the product of an IRI template + expansion relative to the http://api.example.com/an-issue/ resource + by using it as its base URI, which further enables the some:operation to + be moved to i.e. API documentation level rather to inline it.

    + +
    +      
    +    
    +

    Description of HTTP Status Codes and Errors