epos-eu/EPOS-DCAT-AP

Provide extra context in the shapes-warning messages.

Opened this issue · 0 comments

Many of the shacl validation tools produce (understandably) limited context in their reports.

(e.g. the cli of https://github.com/TopQuadrant/shacl or the online ux of https://www.itb.ec.europa.eu/shacl/any/upload)

Leading to less then helpful messages like:

  • message: Provider is recommended. Please fill in a value
  • about: _:b3 (some internal / random blank node identifier assigned by the tool)

I understand this limitation is coming (partly) from these tools, but at least the messages provided in the shapes.ttl could easily contain a better hint towards resolving things by adding more of the context into the message.

e.g. the current https://github.com/epos-eu/EPOS-DCAT-AP/blob/EPOS-DCAT-AP-shapes/epos-dcat-ap_shapes.ttl#L766

sh:message "Provider is recommended. Please fill in a value"@en  ;

changing that into

sh:message "schema:provider (of type schema:Person or schema:Organization) is recommended (for any epos:Webservice). Please fill in a value"@en  ;

would often avoid needing to lookup that kind of context in the shapes file, and thus shortening the roundtrip of try-validate-correct to a large extend

I'm happy to provide a pull request for this, provided it makes sense to the powers that be over here :)