-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some vocabularies provide the JSON-LD using a link header with rel=alternate; type="application/ld+json":
https://www.w3.org/TR/json-ld11/#alternate-document-location
Schema.org is one of these (see schemaorg/schemaorg#3500). For example, if you had the crate with context (ignoring the redundancy of including schema.org here):
"@context": ["https://w3id.org/ro/crate/1.1/context","http://schema.org"],
...
this error will appear
[ ro-crate-1.1_2.2 ] File Descriptor @context property validation:
Check if the file descriptor contains the @context property and it is a valid JSON-LD context
Detected issues
- [Violation]: Unable to retrieve the JSON-LD context "http://schema.org"
This is because content negotiation for JSON-LD is not supported - e.g. the following command won't return JSON-LD as you might expect (and I think the validator currently only does something equivalent to this):
curl -H "Accept:application/ld+json" -L http://schema.org/
Supporting the alternate document location allows the context to be retrieved.
Schema.org is the example here, but this could be relevant in other cases too.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request