netwerk-digitaal-erfgoed / dataset-register

Components (API and crawler) for the NDE Dataset Register
https://datasetregister.netwerkdigitaalerfgoed.nl/api/
European Union Public License 1.2
4 stars 3 forks source link

DCAT dataset validation returns 406 #54

Closed coret closed 3 years ago

coret commented 3 years ago

Not sure about status of DCAT validation, but API return code of 406 whilst local validation report (with project shacl) says ok, seems wrong.

$ curl -i -X PUT https://demo.netwerkdigitaalerfgoed.nl/register-api/datasets/validate -H 'link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type"' -H 'content-type: application/ld+json' --data-binary '{"@id":"https://pzgik.geoportal.gov.pl/semantic-metadata/orto/dataset/eea35251-1767-11e6-b888-b870f44b6730.html"}'

HTTP/2 406
date: Wed, 10 Feb 2021 21:24:52 GMT
content-type: text/plain; charset=utf-8
content-length: 0
strict-transport-security: max-age=15724800; includeSubDomains

$ shacl validate --shapes dcat.jsonld --data data.jsonld

@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix sh:    <http://www.w3.org/ns/shacl#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .

[ a            sh:ValidationReport ;
  sh:conforms  true
] .
ddeboer commented 3 years ago

Please be more specific: what piece of RDF data on that URL would you expect to be a valid dataset?

Also:

See #18 for my request to you to improve the SHACL files.

coret commented 3 years ago

In that case, I will add the "406 Not Acceptable" error to the validation method (like the register method) in the API doc.