-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHACL: Use with hydra:expects #9
Comments
I'd prefer "together with" - extensions should not replace hydra constructs which could lead to alternate reality available to clients understanding an extensions compared to those not understanding it. |
Right. To elaborate, I see two possible scenarios, for the two possible kinds of shapes Shape with implicit target <Person> a hydra:Class, rdfs:Class, sh:NodeShape .
<CreatePersonOperation> a hydra:Operation ; hydra:expects <Person> . This one is simple. The
<PersonShape> a sh:NodeShape ; sh:targetClass foaf:Person .
<AgentShape> a sh:NodeShape ; sh:targetClass foaf:Agent .
foaf:Person rdfs:subClassOf foaf:Agent .
<CreatePersonOperation> a hydra:Operation ; hydra:expects foaf:Person . This one is a bit more problematic and potentially falls in the in place of bucket. The shape is super useful in describing API-specific graph structures for external classes. SHACL also supports subclassing by design. The server in this scenario would validate the model using constraints coming both from There is an overlap with #10, where the client would have to be able to find these shapes so that they know how to construct a request. Of course the worst case scenario is that they would get all shapes and find the right ones in memory at the expense of fetching a larger collection. The problem I have with trying to simultaneously provide description using both Core and SHACL in such scenarios is that you would end up with a bloated client and server code. I'd rather say in the spec that an API MAY provide the rudimentary Hydra Core descriptions but give them the option to require that clients understand only SHACL. This should be enough for semi-closed scenarios, such as internal APIs |
I think it is no more an extension. A replacement is a better name. As for the examples - both looks fine to me. I feel a client would need to understand both |
Describe how
sh:NodeShape
can be used in place of (together with)hydra:Class
to describe request payloadsThe text was updated successfully, but these errors were encountered: