[Specifications] How to document forbidden dereferencability (#216)

alien-mcl has just created a new issue for https://github.com/HydraCG/Specifications:

== How to document forbidden dereferencability ==
## Describe the requirement

In some cases there is a need to disallow client from de-referencing a resource. Currently there is no way of doing that and `hydra:Resource` implies a resource is (at least virtually) de-referencable (client can i.e. HTTP GET it).

When a resource has a _callable_ IRI (http[s] scheme based one), server knows that it won't support GET operation on this URI, thus it may be required to document that fact.

## Proposed solutions

I currently see 3 viable solutions.

1. Downgrade `rdfs:range` of `hydra:expects` and `hydra:returns` (and possibly `hydra:supportedClass`?) to `rdf:Resource` instead of `hydra:Resource`. According to W3C HTTP specification client cannot assume that HTTP/HTTPS based URIs can be called with GET method, thus API documentation won't encourage client to do so as opposite to currently used `hydra:Resource`.

This may be a breaking change as it may affect existing hydra driven implementations, especially those using RDF reasoning process. This makes it simple to introduce external schema vocabularies like SHACL, OWL and non-rdf based ones.

2. Introduce new term that explicitly forbids client from de-referencing a resource. This won't break anything that is using current hydra version and is somehow consistent with RDF (lack of the fact does not imply fact of the lack) and linked data paradigm. It may also open gates for future features like disallowing operations or operation precedence/hiding.

3. Introduce hydra vocabulary profiles or levels, i.e. level 0 and 1 where level 1 would a default current hydra version and level 0 would be an alternative that does not imply a hydra:Resource is de-referencable (or event RDF based). This could also enable hydra for future profiles/levels using external schema vocabularies like SCHAL, OWL and non-rdf based ones.

Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/216 using your GitHub account

Received on Tuesday, 26 May 2020 19:53:00 UTC