openactive / dataset-api-discovery

OpenActive Dataset API Discovery Specification
0 stars 0 forks source link

Consistency of @context #19

Closed nickevansuk closed 4 years ago

nickevansuk commented 4 years ago

Following a discussion with @thill-odi and @nathansalter, it appears that the spec should include a note that:

It is common practice is to reference https://schema.org without a trailing / within @context. However to be consistent with the OpenActive Modelling Opportunity Data specification, which uses the full URI of https://openactive.io/ (including a path as per RFC 3986), the specification requires the schema.org context to be referenced with a trailing slash, i.e. https://schema.org/.

  "@context": [
    "https://schema.org/",
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],

This approach was commended as Google can handle either, and including a / is more technically correct (ref).

nickevansuk commented 4 years ago

Alternative approaches:

Externally consistent

  "@context": [
    "https://schema.org",
    "https://openactive.io/",
    "https://openactive.io/ns-beta"
  ],

However this creates ambiguity within OpenActive data if further contexts are added in future.

Fully consistent

  "@context": [
    "https://schema.org",
    "https://openactive.io",
    "https://openactive.io/ns-beta"
  ],

However this requires a change to all existing feeds, and creates a breaking change from the existing modelling specification.

Apathetic

The spec could allow either to be used, however this does not follow the general approach within OpenActive of tightening the very loose conventions of schema.org wherever possible, to increase general data usability.

thill-odi commented 4 years ago

Incorporated as note in 0.2.