You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This section gives an overview of the proposed handling of API versions and their relation to release management.

It consolidates inputs from 

API family

The notion of API family will not be managed as part of release management. CAMARA releases only consider API versions.

It is recommended to adopt the proposal to make the API family a working group, and have the API sub-project focus on the development of one or more APIs.

See Herbert's proposal here: Proposal to establish API Families as Working Groups across API Sub Projects · Issue #7 · camaraproject/ReleaseManagement (github.com)

this will reduce the number of meetings and reporting load with the increasing number of APIs, and facilitate moving APIs from one family to another, or combining APIs from multiple families into into into family.

API versioning

API version

The API version is defined in the "version" field of the OAS definition of an API. Its content MUST follow Semantic Versioning 2.0.0 | Semantic Versioning (semver.org).

An API version has the format:  x.y.z  where x, y and z are numbers corresponding to MAJOR, MINOR and PATCH releases.

The following provides some extracts of the semver 2.0 specification (and links to the corresponding spec item):

  • Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable. https://semver.org/#spec-item-4
  • Version 1.0.0 defines the public API. The way in which the version number is incremented after this release is dependent on this public API and how it changes. https://semver.org/#spec-item-5
    • Patch version Z (x.y.Z | x > 0) MUST be incremented if only backward compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior. https://semver.org/#spec-item-6

    • Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backward compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented. 

    • Major version X (X.y.z | X > 0) MUST be incremented if any backward incompatible changes are introduced to the public API. It MAY also include minor and patch level changes. Patch and minor versions MUST be reset to 0 when major version is incremented.

Precedence example:  1.0.0 < 2.0.0 < 2.1.0 < 2.1.1.

The API guidelines describe the applicable versioning strategy.

API version extension 

The following extensions are allowed to the API version:

  • -alpha.m
  • -beta.n
  • -rc.o ?? - do we need this as part of version or only on GitHub assets - the latter is preferred.

Extensions are post-fixed to the API version numbers and separated from it by a hyphen "-". m, n, and o are numbers. It is up to the API sub-project to decide if / when they create an alpha or beta version of an API.

Precedence example: 1.0.0-alpha.1 < 1.0.0-alpha.2 < 1.0.0-beta.1 < 1.0.0-beta.2 < 1.0.0-rc.1 < 1.0.0-rc.2 < 1.0.0 < 2.0.0-alpha.1

Release candidate and release

The notions of API release candidate and API release are linked to the release management process, not to an API's version. Any API version, be it alpha, beta, major, minor, or patch, can be released, provided it meets the relevant set of CAMARA API release requirements.

A release candidate branch shall be created for an API version when its definition is agreed by the API sub-project, before API testing as required by the release management process will be applied. As a result of testing, changes may be made to the release candidate 

Release versus versioning


release milestoneAPI version field

[version extension]

API version in URLrelease branch namerelease branch tagrelease package namerelease taglater: PR annotation
API devt.0.9.0
v0release-0.9.0v0.9.0release-0.9.0development
M30.10.0
v0release-0.10.0v0.10.0release-0.10.0pre-release
M41.0.0
v1release-1.0.0v1.0.0release-1.0.0latest
....







M42.0.0
v2release-2.0.0v2.0.0release-2.0.0latest
API devt.2.1.0
v2release-2.1.0v2.1.0release-2.1.0development
API devt.2.2.0
V2release-2.2.0v2.2.0release-2.2.0development
API devt.2.4.0-alpha.1v2alpharelease-2.4.0-alpha.1v2.4.0-alpha.1release-2.4.0-alpha.1development
M3 compatible functional extension2.4.0-alpha.1v2alpharelease-2.4.0-alpha.1v2.4.0-alpha.1release-2.4.0-alpha.1pre-release
M42.4.0<extension removed>v2release-2.4.0v2.4.0release-2.4.0latest









M3 non-compatible functional extension3.0.0-alpha.1v3alpharelease-3.0.0-alpha.1v3.0.0-alpha.1release-3.0.0-alpha.1pre-release
M3 non-compatible functional extension3.0.0-beta.1v3betarelease-3.0.0-beta.1v3.0.0-beta.1release-3.0.0-beta.1pre-release
M43.0.0<extension removed>v3release-3.0.0v3.0.0release-3.0latest


API version in URL

The API guidelines contain the following approach for defining the API endpoint URL:

servers:
  - url: "{apiRoot}/qod/v2"
    variables:
      apiRoot:
        default: http://localhost:9091
        description: API root

The API version in the URL is ONLY the MAJOR digit of the API version, "v2" in the above example.

The apiRoot is to be adapted by the implementer of the API endpoint (the API provider).

To reflect extension of APIs, the API version in the URL MAY include the version extension, but without any hyphen or dots. 

Example: in the URL the version is v2alpha1 for API version 2.y.z-alpha.1

Ideally such an extension to the API version in the URL should not be needed if the API 

  • No labels