openactive / conformance-certification

Vocabulary supporting OpenActive Conformance Certification
0 stars 0 forks source link

Conformance Certificates #1

Open nickevansuk opened 4 years ago

nickevansuk commented 4 years ago

Background

In order to ensure that the level of quality of data published, and of API implementation can be verified, a conformance certification approach is generally taken within ecosystems.

For OpenActive, there are a number of details that are undefined, and that may change over time depending on the sustainability model:

Regardless of how such a certificate is obtained, the following properties of the certificate appear to be useful in all cases:

Additionally, to allow any type of decentralised model, the certificate must be sufficiently difficult to fake, such that any organisation that creates a fake certificate will have done so intentionally (a reputational risk) rather than just accidentally.

The OpenActive Test Suite's current implementation takes the lightest approach regarding the above, while making the move towards any more formal/centralised approach on any of the points above later fairly trivial:

The current implementation currently exists primarily so that implementers have a simple and robust route to demonstrating conformance to a non-technical audience, while ensuring that the tooling is built and maintained with this capability in mind.

The current implementation of the certificate is a web page, that contains machine-readable JSON-LD, and an embedded Zip file of the results (see here for an example: https://openactive.io/openactive-test-suite/example-output/controlled/certification/).

Proposal

To cover the gap identified here, a specification should be provided that includes the provision to describe such a certification, on the basis that:

This proposal suggests the following structure to describe such a certification:

{
  "@context": "https://openactive.io/",
  "@type": "ConformanceCertificate",
  "@id": "https://openactive.io/openactive-test-suite/example-output/controlled/certification/",
  "name": "OpenActive Conformance Certificate for AcmeBooker",
  "description": "This conformance certificate has been produced automatically from the OpenActive Test Suite.",
  "dateCreated": "2020-07-04T18:49:47Z",
  "validFor": "P3M",
  "featureImplemented": [
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#dataset-site",
      "prefLabel": "Dataset Site",
      "inScheme": "https://openactive.io/specification-features"
    },
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#availability-check",
      "prefLabel": "Availability Checking",
      "inScheme": "https://openactive.io/specification-features"
    },
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#simple-book-free-opportunities",
      "prefLabel": "Simple Booking of free opportunities",
      "inScheme": "https://openactive.io/specification-features"
    }
  ],
  "featureNotImplemented": [],
  "opportunityTypeImplemented": [
    "ScheduledSession"
  ],
  "associatedMedia": {
    "@type": "MediaObject",
    "contentUrl": "data:application/octet-stream;base64,UEsDBAoAAAAAADeW5FAAAAAAAAAAAAAAAAAJAA..."
  },
  "awardedTo": {
    "@type": "BookingService",
    "name": "AcmeBooker",
    "softwareVersion": "2.0",
    "url": "https://acmebooker.example.com/"
  },
  "recognizedBy": {
    "@type": "Organization",
    "name": "OpenActive",
    "url": "https://www.openactive.io/"
  }
}

Modelling considerations for the above:

Hence the modelling additions for this certification are fairly light.

nickevansuk commented 4 years ago

As this requirement of the Dataset API Discovery specification is currently only related to the certificate files generated by and validated by the OpenActive Test Suite, it has been moved into a separate repository and vocabulary (https://openactive.io/conformance-certification).

This vocabulary can evolve with the OpenActive Test Suite, and with implementation experience and more bandwidth available in the future, could be formalised into a full OpenActive specification.

Hence the machine-readable JSON-LD within the Conformance Certificate should be rendered as follows:

{
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/conformance-certification"
  ],
  "@type": "cert:ConformanceCertificate",
  "@id": "https://openactive.io/openactive-test-suite/example-output/controlled/certification/",
  "name": "OpenActive Conformance Certificate for AcmeBooker",
  "description": "This conformance certificate has been produced automatically from the OpenActive Test Suite.",
  "dateCreated": "2020-07-04T18:49:47Z",
  "validFor": "P3M",
  "cert:featureImplemented": [
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#dataset-site",
      "prefLabel": "Dataset Site",
      "inScheme": "https://openactive.io/specification-features"
    },
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#availability-check",
      "prefLabel": "Availability Checking",
      "inScheme": "https://openactive.io/specification-features"
    },
    {
      "@type": "Concept",
      "@id": "https://openactive.io/specification-features#simple-book-free-opportunities",
      "prefLabel": "Simple Booking of free opportunities",
      "inScheme": "https://openactive.io/specification-features"
    }
  ],
  "cert:featureNotImplemented": [],
  "cert:opportunityTypeImplemented": [
    "ScheduledSession"
  ],
  "associatedMedia": {
    "@type": "MediaObject",
    "contentUrl": "data:application/octet-stream;base64,UEsDBAoAAAAAADeW5FAAAAAAAAAAAAAAAAAJAA..."
  },
  "cert:awardedTo": {
    "@type": "BookingService",
    "name": "AcmeBooker",
    "softwareVersion": "2.0",
    "url": "https://acmebooker.example.com/"
  },
  "recognizedBy": {
    "@type": "Organization",
    "name": "OpenActive",
    "url": "https://www.openactive.io/"
  }
}