-
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: Shapes discovery #10
Comments
What is an extension regarding pure hydra in this scenario? From hydra point of view it's a standard Iri template. Indeed she |
Not sure if I understood the question. The missing piece would be the actual link from the documentation to the shapes collection. Not enough to just add the # or maybe subPropertyOf hydra:search ?
hashi:shapes rdfs:subPropertyOf hydra:collection .
<api>
a hydra:ApiDocumentation ;
hashi:shapes [
# the search template as above
] . The actual document would describe what a clients/server should or must do with this property, ie. define some best practices about interpreting the template variables as used above, etc. |
You could use strongly typed collections - this way there is no need to introduce new predicates - client could discover a collection of shapes with pure hydra. |
Would strongly typed collections provide filtering? A server could add "non-standard" variable/property maps to the template to give client who understand a more flexible query mechanism to get the exact shapes they need |
Well ok, I think I see who we can put 2 and 2 together. </api/ShapesCollection>
a hydra:Class ;
rdfs:subClassOf hydra:Collection ;
hydra:memberAssertion [
hydra:property rdf:type ; hydra:object sh:NodeShape ;
] ;
hydra:search [
# as above
] .
</api> hydra:collection </shapes> .
</shapes> a </api/ShapesCollection> . This way the extension would only need to describe that compliant clients look for a The only downside is that |
I have found it useful to be able to easily find Node Shapes for a given class. There are a handful of scenarios.
In one, an operation
expects
a class which is described by multiple shapes.<operation> hydra:expects schema:Person .
A client could generate a form UI from shapes targeting the given class.
Secondly, an application itself can render resources views from shape descriptions. These could be served from the same collection filtered differently or a different one
The difference here is the filter property. In the validation case, the strong
sh:targetClass
property would be used. In a less strict scenariodash:applicableToClass
could be used to find shapes which do not otherwise trigger validation.The collection template could be similar to that below
The text was updated successfully, but these errors were encountered: