fluree / db

Fluree database library
https://fluree.github.io/db/
Other
337 stars 21 forks source link

return a SHACL Validation Report for validation exceptions #759

Closed dpetran closed 5 months ago

dpetran commented 5 months ago

https://www.w3.org/TR/shacl/#validation-report

This utilizes the official SHACL vocabulary for validation report results. I had to augment the official vocabulary with f:expectation, as I think that's a very useful part of the validation result.

I also added support for user-specified severity and message keys on the shape, according to the spec.

While updating the test expectations I restructured multiple tests to allow the data and the expectation to live adjacent to each other.

dpetran commented 5 months ago

@aaj3f If you've got any thoughts about how errors should look, this is a great PR to discuss them on.