- From: Tomasz Pluskiewicz via GitHub <sysbot+gh@w3.org>
- Date: Mon, 25 May 2020 11:59:45 +0000
- To: public-hydra-logs@w3.org
tpluscode has just created a new issue for https://github.com/HydraCG/Specifications: == Use SHACL for `IriTemplate` mappings == Oh, what about `IriTemplate` mappings. Maybe they could also be described with a Shape? The entire mappings could easily be swapped with a Shape, provided that individual `PropertyShapes` have an additional variable name which use use currently. Here's an idea for changing [EXAMPLE 19](http://www.hydra-cg.com/spec/latest/core/#example-19-description-of-an-iri-template) from the spec ```diff { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@type": "IriTemplate", "template": "http://api.example.com/issues{?q}", "variableRepresentation": "BasicRepresentation", - "mapping": [ - { - "@type": "IriTemplateMapping", + "mapping": { + "@type": "sh:NodeShape", + "sh:property": [ "variable": "q", - "property": "hydra:freetextQuery", - "required": true - } - ] + "sh:path": "hydra:freetextQuery", + "sh:minCount": 1 + ] + } } ``` Little has to change conceptually. - `hydra:IriTemplateMapping -> sh:PropertyShape` - `hydra:variable` used with `sh:PropertyShape` - `hydra:property -> sh:path` - `hydra:required -> sh:minCount` Of course, some limitations could be imposed for practical reasons: - only single level of shapes - no property paths _Originally posted by @tpluscode in https://github.com/HydraCG/Specifications/issues/214#issuecomment-633414408_ Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/215 using your GitHub account
Received on Monday, 25 May 2020 11:59:46 UTC