Re: HTTP requests, databases and how to transmit SHACL validation reports

Hi,

I’ve given this more thought.

Once content profiles becomes a standard it would probably solve this very well. We could then indicate that our response is both N-Quads and a validation report, and together with an HTTP error code it would be a clean way of saying “your request failed, you can see the reason in this N-Quads file that represents the validation report”. 

In the mean time we (RDF4J) are already using the content-type approach that was initially discussed here back in March. It was released as part of RDF4J 3.2.0 (May 7th) to communicate a validation error between the RDF4J Server and a client. 

We may consider migrating to a custom header while we wait for content profiles to become mainstream. 

Håvard

> On 10 Jun 2020, at 16:47, Andy Seaborne <andy@apache.org> wrote:
> 
> 
> 
> On 08/06/2020 08:58, Håvard Ottestad wrote:
>> Hi,
>> Following up after a test of Stardog.
>> It seems that they use the following header to indicate a validation error:
>> SD-Error-Code: TXHRE2
>> I guess SD stands for Stardog.
>> They also return json and don't respect the Accept header.
>> A question for you Andy. Does Fuseki support SHACL in such a way as to cancel a transaction if committing it would violate the shapes?
> 
> Not yet in Fuseki; it is in the "plan". It does exist in the codebase, but isn't accessible in Fuseki yet without loading custom code.
> 
>    Andy
> 
>> Cheers,
>> Håvard
>> On Fri, Jun 5, 2020 at 7:40 AM <lars.svensson@web.de <mailto:lars.svensson@web.de>> wrote:
>>    On Freitag, 05. Juni 2020 um 01:24 Uhr, "Andy Seaborne"
>>    <andy@apache.org <mailto:andy@apache.org>> wrote:
>>    [...]
>>     > > I don’t see how a SHACL validation violation would produce
>>    anything other than a SHACL validation report.
>>     > >
>>     > > My initial thought was a custom header and standard mime type.
>>     >
>>     > Vladimir has mentioned profiles:
>>     >
>>     > https://www.w3.org/TR/dx-prof-conneg/
>>     >
>>     > which look like a progressive approach.
>>    [Disclaimer: I'm one of the editors of that document]
>>    Yes, this is exactly what profiles are for. What's needed is a URI
>>    that identifies a document as a SHACL validation report
>>    _irrespective of the media type_ (i.e it's orthogonal to the fact
>>    that it's turtle or RDF/XML or any other syntax).
>>     > So I see there are choices to consider before making a de-facto
>>     > registration (a CG can't formally register a MIME type).
>>    Can a CG can write a note defining URIs for SHACL profiles? I guess
>>    there would be two of them, one for shape definition documents (or
>>    rather "this document contains (among other things) shape
>>    definitions" and one for SHACL validation reports.
>>    And (this one's for Andy): Is profiles something you could consider
>>    adding to Jena?
>>    Best,
>>    Lars

Received on Thursday, 11 June 2020 06:36:45 UTC