GS1 voc returns neither the context nor the ontology as pure JSONLD.
Instead, both the ontology URL (https://gs1.org/voc) and any term URL (eg https://gs1.org/voc/AdditionalProductClassificationDetails),
with any content type,
return a HTML, with the whole ontology as embedded JSONLD script.
I don't see how to get the context ONLY.
curl -LI -Happlication/ld+json https://www.gs1.org/voc/
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
https://gs1.org/voc must support context negotiation and return the ontology as pure JSONLD if requested, and other common serializations (Turtle is most useful, and RDF/XML is mandated)
The WebVoc context is currently very simple, it's just a list of prefixes.
the ontology defines properties, but the context doesn't define any datatypes.
returning ontology triples in the same JSONLD is allowed, but will slow down processing and may compromise caching, so is not recommended
since it uses schema terms, it should probably include "http://schema.org" (or "https://schema.org") as first element. This shows that URL returns the schema context.
As raised in https://github.com/gs1/EPCIS/issues/244:
GS1 voc returns neither the context nor the ontology as pure JSONLD. Instead, both the ontology URL (https://gs1.org/voc) and any term URL (eg https://gs1.org/voc/AdditionalProductClassificationDetails), with any content type, return a HTML, with the whole ontology as embedded JSONLD script. I don't see how to get the context ONLY.
The WebVoc context is currently very simple, it's just a list of prefixes.
Currently there's not much benefit in exposing a Voc context. But if it's made richer then:
schema
terms, it should probably include"http://schema.org"
(or"https://schema.org"
) as first element. This shows that URL returns theschema
context.