Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation with SHACL #191

Open
tpluscode opened this issue Nov 5, 2024 · 0 comments
Open

Validation with SHACL #191

tpluscode opened this issue Nov 5, 2024 · 0 comments

Comments

@tpluscode
Copy link
Contributor

We need easy support to validate requests bodies. Probably a plugin which will add a handler before all requests which we'd want validated.

Which requests do we want validated? By default I expect that all bodies should attempt validation unless there is a flag on the select Resource Shape such as kl:validate false.

The crucial part is finding the right shape(s). I see three possible options:

  1. Selecting shapes based on the request payload and targets of known shapes
  2. Declaring concrete shapes graphs to use for a given request on Resource Shape level
  3. Preload shapes at app start

To retrieve shapes on-demand using SPARQL is expensive so we could favour option 3. For example to load all shapes typed as a hypothetical kl:ValidationShape. They would be loaded early in the app lifecycle and used for requests without requiring further queries. The downside is that app changes to these graphs won't be reflected automatically. Might as well load them solely from the filesystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant