open-education-api / specification

OpenAPI (fka Swagger) specification for the Open Education API.
Other
32 stars 26 forks source link

Communicate OOAPI and consumer versions within an api request. #313

Open remco-jak opened 2 months ago

remco-jak commented 2 months ago

Organization

Netwerk Examinering Digitalisering

Project

NED-OOAPI - MBO OKE

Contact Details

No response

Short description

Communicate supported OOAPI and consumer versions within an api request.

Version

v5

Usecase

Within the MBO OKE project, all systems need to support multiple versions of a consumer. The consequence is that systems need to be able to communicate what versions they support.

Since OOAPI verisoning and consumer versioning are separate processes, both the OOAPI and consumer versiond needs to be addressed.

Which institutions support this change?

No response

Proposed solution

Following assumptions have been made:

Proposed solution: Use Accept and Content-Type headers A custom mimetype could be used: application/vnd.ooapi+json

OOAPI version 5 example

Accept: application/vnd.ooapi+json;version=5.*
Content-Type: application/vnd.ooapi+json;version=5.*

OOAPI and consumer version examples:

Accept: application/vnd.ooapi+json;version=5.*;consumer-version=0.94, application/vnd.ooapi+json;version=5.*;consumer-version=0.95, application/vnd.ooapi+json;version=5.*

Content-Type: application/vnd.ooapi+json;version=5.*;consumer-version=0.94

N.B. It is essential make agreements about communicating the consumer name within a request. However, this is not part of this proposal, it will/needs to be addressed in a separate proposal. Accept header mime types may use the q parameter for weighting, as commonly used and according to web standards.

Requests and responses

No response

What is your question for the OOAPI work group?

Could the OOAPI work group keep the MBO OKE project informed about this issue?