Skip to content

feat(rdf): allow front-end to get available SHACL validation sets #5225

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

Merged
merged 17 commits into from
Jul 22, 2025

Conversation

svandenhoek
Copy link
Contributor

@svandenhoek svandenhoek commented Jul 15, 2025

What are the main changes you did

  • Added API call that returns the available SHACL validation sets (excluding the file paths)
  • Refuses to give yaml output if user does not have access to any schema's to use them on

TODO:

  • add tests
  • update docs

How to test

  • explain here what to do to test this (or point to unit tests)

Checklist

  • updated docs in case of new feature
  • added/updated tests
  • added/updated testplan to include a test for this fix, including ref to bug using # notation

@svandenhoek svandenhoek marked this pull request as ready for review July 21, 2025 10:00
@svandenhoek svandenhoek requested a review from harmbrugge July 21, 2025 10:12
Copy link
Member

@harmbrugge harmbrugge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, minor comment

private static void setYamlFormat(Context ctx) {
// application/yaml does not show output in browser but downloads instead, so uses suffix:
// https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml
ctx.contentType("text/plain+yaml");
Copy link
Member

@harmbrugge harmbrugge Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constant

@@ -988,6 +989,8 @@ public void testRdfApiRequest() {
final String defaultContentType = "text/turtle";
final String jsonldContentType = "application/ld+json";
final String ttlContentType = "text/turtle";
final String defaultContentTypeWithCharset = "text/turtle; charset=utf-8"; // charset is ignored
final String yamlContentType = "text/plain+yaml";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zodat je he hem hier ook niet dubbel hoeft te gebruiken.

Copy link

@svandenhoek svandenhoek merged commit dae1d7a into master Jul 22, 2025
7 checks passed
@svandenhoek svandenhoek deleted the feat/shacl_yaml_api_access branch July 22, 2025 14:51
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

Successfully merging this pull request may close these issues.

2 participants