TopQuadrant / shacl-js

SHACL API in JavaScript
Apache License 2.0
70 stars 18 forks source link

Configuration object and partial validation #16

Closed antoniogarrote closed 6 years ago

antoniogarrote commented 6 years ago

This PR introduces a configuration option for the validation engine making it possible to stop the evaluation of the constraints, once a maximum number of errors have been reached.

The use case for this behaviour is situations where we just need to know if the data graph is valid or not, regardless of the total number of errors. For example, where providing a validity service where we want to maximise the performance of the service and where failing fast is preferred to getting the complete set of validation errors.

To make it possible to configure this behaviour, a configuration object has been introduced where this option (and other future options) can be set-up.

Matching Java change: https://github.com/TopQuadrant/shacl/pull/36