Open nichtich opened 1 year ago
See SHACL result report for error responses. position
consists of focusNode
and and optional resultPath
and value
. In addition there is a sourceConstraintComponent
(type of error).
To transform JSON result of SHACL validation use jq
:
.results.bindings[]|{
message:.message.value,
type:.type.value,
position: (
if .node.type=="uri" then
{ uri: .node.value, rdfterm: ("<"+.node.value+">") }
else {} end
+ if .path then
{ "shacl-path":.path }
else {} end
)
}
To include resultPath
, another locator language must be defined on top of SHACL property path.
First use case could be validation of SKOS via https://github.com/skohub-io/shapes.
Apart from mapping SHACL result report to validation server errors, the validation of SKOS requires an encoding
parameter, e.g.
format=skos&encoding=ttl
(RDF serialization ttl
)format=skos&encoding=json-ld,yaml
(RDF serialization json-ld
encoded in yaml
)
SHACL and SheX can be used to check RDF data. There is a node implementation for SHACL.
This feature lacks a use case with an actual data format defined by a SHACL and/or SheX schema. Suggestions?