dbpedia / gstore

Git repo / triple store hybrid graph storage
Apache License 2.0
3 stars 0 forks source link

add report as jsonld #14

Closed holycrab13 closed 2 years ago

holycrab13 commented 2 years ago

Using http error codes to determine the result of a SHACL validation feels very weird. Is this something we should discuss?

A failed SHACL validation returns a 400 currentlly, which suggests a wrong user input. However, a SHACL validation can fail successfuly (fail, when failure is expected)

In my opinion, 400 should be reserved for actually bad input data (not parseable, wrong parameters, missing parameters) Correct input data should always return a 200 with a json object containing the result in a well-formatted manner, e.g:

{
   success: false,
   messages: [
      'violation 1',
      'violation 2'
  ]
}

or even better, the SHACL validation report as JSONLD.

manonthegithub commented 2 years ago

Good idea! I can implement this, if there are no objections from Sebastian.

Kind regards / Mit freundlichen Grüßen, Kirill Yankov.

On 13 Jan 2022, at 16:26, holycrab13 @.***> wrote:

 Using http error codes to determine the result of a SHACL validation feels very weird. Is this something we should discuss?

A failed SHACL validation returns a 400 currentlly, which suggests a wrong user input. However, a SHACL validation can fail successfuly (fail, when failure is expected)

In my opinion, 400 should be reserved for actually bad input data (not parseable, wrong parameters, missing parameters) Correct input data should always return a 200 with a json object containing the result in a well-formatted manner, e.g:

{ success: false, messages: [ 'violation 1', 'violation 2' ] } or even better, the SHACL validation report as JSONLD.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.

manonthegithub commented 2 years ago

the return codes were changed as discussed. the report in a form of jsonld needs to be added. Now report is returned as a multiline string.

manonthegithub commented 2 years ago

done in latest commit, now the report is returned in RDF