You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[5.1 API version (OAS Info object)](#51-api-version-oas-info-object)
30
+
-[5.1 API version (OAS info object)](#51-api-version-oas-info-object)
31
31
-[5.2 API version in URL (OAS servers object)](#52-api-version-in-url-oas-servers-object)
32
32
-[5.3 API versions throughout the release process](#53-api-versions-throughout-the-release-process)
33
-
-[5.4 Backwards and Forward Compatibility](#54-backwards-and-forward-compatibility)
33
+
-[5.4 Backward and forward compatibility](#54-backward-and-forward-compatibility)
34
34
-[6. Error Responses](#6-error-responses)
35
35
-[7. Common Data Types](#7-common-data-types)
36
36
-[8. Pagination, Sorting and Filtering](#8-pagination-sorting-and-filtering)
@@ -541,16 +541,16 @@ These considerations are below:
541
541
542
542
Versioning is a practice by which, when a change occurs in the API, a new version of that API is created.
543
543
544
-
API versions use a numbering scheme in the format: x.y.z
544
+
API versions use a numbering scheme in the format: `x.y.z`
545
545
546
546
* x, y and z are numbers corresponding to MAJOR, MINOR and PATCH versions.
547
547
* MAJOR, MINOR and PATCH refer to the types of changes made to an API through its evolution.
548
548
* Depending on the change type, the corresponding number is incremented.
549
549
* This is defined in the [Semantic Versioning 2.0.0 (semver.org)](https://semver.org/) standard.
550
550
551
-
### 5.1 API version (OAS Info object)
551
+
### 5.1 API version (OAS info object)
552
552
553
-
The API version is defined in the "version" field (in the Info object) of the OAS definition file of an API.
553
+
The API version is defined in the `version` field (in the `info` object) of the OAS definition file of an API.
554
554
555
555
```yaml
556
556
info:
@@ -568,13 +568,13 @@ In line with Semantic Versioning 2.0.0, the API with MAJOR.MINOR.PATCH versio
568
568
569
569
For more details on MAJOR, MINOR and PATCH versions, and how to evolve API versions, please see [API versioning](https://wiki.camaraproject.org/x/a4BaAQ) in the CAMARA wiki.
570
570
571
-
It is recommended to avoid breaking backwards compatibility unless strictly necessary: new versions should be backwards compatible with previous versions. More information on how to avoid breaking changes can be found below.
571
+
It is recommended to avoid breaking backward compatibility unless strictly necessary: new versions should be backwards compatible with previous versions. More information on how to avoid breaking changes can be found below.
572
572
573
573
### 5.2 API version in URL (OAS servers object)
574
574
575
-
The OAS file also defines the API version used in the URL of the API endpoint (in the servers object).
575
+
The OAS file also defines the API version used in the URL of the API (in the `servers` object).
576
576
577
-
The API version in the URL only includes the "x" (MAJOR version) number of the API version as follows:
577
+
The API version in the `url` field only includes the "x" (MAJOR version) number of the API version as follows:
578
578
579
579
```yaml
580
580
servers:
@@ -583,7 +583,7 @@ servers:
583
583
584
584
---
585
585
586
-
IMPORTANT: CAMARA initial public APIs (see explanation below) shall use both the MAJOR and the MINOR version number (v0.y) separated by a dot (".") in the API version in the URL.
586
+
IMPORTANT: CAMARA public APIs with x=0 (`v0.x.y`) MUST use both the MAJOR and the MINOR version number separated by a dot (".") in the API version in the `url` field: `v0.y`.
587
587
588
588
---
589
589
@@ -592,18 +592,18 @@ servers:
592
592
url: {apiRoot}/number-verification/v0.3
593
593
```
594
594
595
-
This allows for test and usage of initial API versions as they are evolving rapidly, e.g. /qod/v0.10, or /qod/v0.11alpha1. However, it should be acknowledged that any initial API version may change.
595
+
This allows for both test and commercial usage of initial API versions as they are evolving rapidly, e.g. `/qod/v0.10alpha1`, `/qod/v0.10rc1`, or `/qod/v0.10`. However, it should be acknowledged that any initial API version may change.
596
596
597
597
### 5.3 API versions throughout the release process
598
598
599
599
In preparation for its public release, an API will go through various intermediate versions indicated by version extensions: alpha and release-candidate.
600
600
601
601
Overall, an API can have any of the following versions:
602
602
603
-
* work-in-progress (wip) API versions used during the development of an API before the first pre-release or in between pre-releases. Such API versions cannot be released and are not usable by API consumers.
604
-
* alpha (x.y.z-alpha.m) API versions (with extensions) for CAMARA internal API rapid development purposes
605
-
* release-candidate (x.y.z-rc.n) API versions (with extensions) for CAMARA internal API release bug fixing purposes
606
-
* public (x.y.z) API versions for usage in commercial contexts. These API versions only have API version number x.y.z (semver 2.0), no extension. Public APIs can have one of two maturity states:
603
+
* work-in-progress (`wip`) API versions used during the development of an API before the first pre-release or in between pre-releases. Such API versions cannot be released and are not usable by API consumers.
604
+
* alpha (`x.y.z-alpha.m`) API versions (with extensions) for CAMARA internal API rapid development purposes
605
+
* release-candidate (`x.y.z-rc.n`) API versions (with extensions) for CAMARA internal API release bug fixing purposes
606
+
* public (`x.y.z`) API versions for usage in commercial contexts. These API versions only have API version number x.y.z (semver 2.0), no extension. Public APIs can have one of two maturity states (used in release management):
607
607
* initial - indicating that the API is still not fully stable (x=0)
608
608
* stable - indicate that the API has reached a certain level of maturity (x>0)
609
609
@@ -624,9 +624,9 @@ Precedence examples:
624
624
625
625
For more information, please see [API versioning](https://wiki.camaraproject.org/x/a4BaAQ) in the Release Management project Wiki.
626
626
627
-
### 5.4 Backwards and Forward Compatibility
627
+
### 5.4 Backward and forward compatibility
628
628
629
-
Avoid breaking backwards compatibility, unless strictly necessary, means that new versions should be compatible with previous versions.
629
+
Avoid breaking backward compatibility, unless strictly necessary, means that new versions should be compatible with previous versions.
630
630
631
631
Bearing in mind that APIs are continually evolving and certain operations will no longer be supported, the following considerations must be taken into account:
632
632
@@ -636,7 +636,7 @@ Bearing in mind that APIs are continually evolving and certain operations will n
636
636
- Remove deprecated APIs documentation.
637
637
- Never start using already deprecated APIs.
638
638
639
-
<font size="3"><span style="color: blue"> Types of modification: </span></font>
639
+
Types of modification:
640
640
641
641
- Not all API changes have an impact on API consumers. These are referred to as backward compatible changes.
642
642
- In case of such changes, the update produces a new API version that increases the MINOR or PATCH version number.
@@ -660,9 +660,9 @@ Breaking changes to an API that **DO** affect consumers:
660
660
- Modifying or removing a mandatory parameter in existing operations (resource verbs). For example, when consulting a resource, a certain field is no longer returned. Another example: a field that was previously a string is now numeric.
661
661
- Modifying or adding new responses to existing operations. For example: creating a resource can return a 412 response code.
Tho ensure this compatibility, the following must be followed.
665
+
To ensure this compatibility, the following guidelines must be applied.
666
666
667
667
**As API provider**:
668
668
- Never change an endpoint name; instead, add a new one and mark the original one for deprecation in a MINOR change and remove it in a later MAJOR change (see semver FAQ entry: https://semver.org/#how-should-i-handle-deprecating-functionality)
0 commit comments