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
[Read online at GitBook](https://adidas.gitbook.io/api-guidelines/)
8
10
9
11
### Motivation
10
12
11
-
The goal of this document is to facilitate the work and minimize the effort of all API users at adidas while protecting their investment and encouraging API adoption.
13
+
The goal of this document is to facilitate the work and minimize the effort of all API users at adidas while protecting their investment and encouraging API First adoption.
12
14
13
15
These guidelines lay down the foundation for collaboration, stability, and extensibility.
14
16
@@ -19,13 +21,15 @@ The API Guidelines are split into two main parts:
The general guidelines section discusses the core principles relevant to any kind of API. 
23
27
24
-
The general guidelines section discusses the core principles relevant to any kind of API. The API type-specific section further defines the guidelines specific to a given architectural style or API technique (such as REST, Kafka or GraphQL APIs).
28
+
The API type-specific section further defines the guidelines specific to a given architectural style or API technique (such as REST, Kafka or GraphQL APIs).
25
29
26
30
### How to read the Guidelines
27
31
28
-
These Guidelines are available for online reading at [GitBook](https://adidas.gitbook.io/api-guidelines/). The source code can be found on [GitHub](https://github.com/adidas/api-guidelines).
32
+
These guidelines are available for online reading at [GitBook](https://adidas.gitbook.io/api-guidelines/). The source code can be found on [GitHub](https://github.com/adidas/api-guidelines).
29
33
30
34
The CAPITALIZED words throughout these guidelines have a special meaning:
31
35
@@ -35,54 +39,54 @@ The CAPITALIZED words throughout these guidelines have a special meaning:
35
39
> this document are to be interpreted as described in RFC2119.
36
40
> ```
37
41
38
-
Refer to [RFC2119](https://www.ietf.org/rfc/rfc2119) for details.
42
+
Refer to [RFC2119](https://www.rfc-editor.org/rfc/rfc2119) for details.
39
43
40
44
### Validating your API Guidelines against OpenAPI Specification
41
45
42
-
In the `ruleset.md` file you can find a digest of API Guidelines rules which you can use to validate your API description documents. If you are using OpenAPI Specification as the API description format you can also leverage the `.spectral.yaml` ruleset to automatically verify your specification compliance using [Spectral](github.com/stoplightio/spectral/).
46
+
In the `ruleset.md` file you can find a digest of API Guidelines rules which you can use to validate your API description documents.
43
47
44
-
To install Spectral you will need Node.js and a package manager (npm or yarn).
48
+
If you are using OpenAPI or AsyncAPI specification as API description format, you can also leverage the `adidas-spectral.yaml` ruleset to automatically lint your specification compliance using [Spectral](https://meta.stoplight.io/docs/spectral/674b27b261c3c-overview).
45
49
46
-
Note: The version used with the spectral specifications was 5.3.0
50
+
> To install Spectral, you will need Node.js and a package manager (npm or yarn).
47
51
48
-
```
49
-
npm install -g @stoplight/spectral@5.3.0
52
+
```bash
53
+
npm install -g @stoplight/spectral-cli
50
54
51
55
# OR
52
56
53
-
yarn global add @stoplight/spectral@5.3.0
57
+
yarn global add @stoplight/spectral-cli
58
+
```
59
+
60
+
Once installed, to verify your _oas_ or _async_ file with spectral execute:
Once installed, to verify your OAS file with spectral execute `spectral lint <oas-file> -r <adidas-api-guidelines-folder>/.spectral.yaml` where `<adidas-api-guidelines-folder>/.spectral.yaml` indicated the location `.spectral.yaml` file.
66
+
### Contact Us
57
67
58
-
For further documentation on Spectral refer to their [documentation](https://stoplight.io/p/docs/gh/stoplightio/spectral/README.md).
68
+
In case you have any questions or comments, please utilize the appropriate GitHub collaboration tools, such as issues, pull requests, and discussions.
59
69
60
-
### Questions & Comments
70
+
If you want to contact adidas API Team regarding these guidelines, you can mail us at
61
71
62
-
_Please contact_ [_jesusjavier.dediego@adidas.com_](mailto:jesusjavier.dediego@adidas.com) _in case of questions._
72
+
 _**api-team@adidas.com**_
63
73
64
74
## Intended Use Cases
65
75
66
76
This project is intended to provide the guidelines for design & development of APIs at adidas.
67
77
68
-
adidas is not responsible for the usage of this software for different purposes that the ones described in the use cases.
78
+
Adidas is not responsible for the usage of this software for different purposes that the ones described in the use cases.
adidas AG publishes this software and accompanied documentation (if any) subject to the terms of the MIT license with the aim of helping the community with our tools and libraries which we think can be also useful for other people. You will find a copy of the MIT license in the root folder of this package. All rights not explicitly granted to you under the MIT license remain the sole and exclusive property of adidas AG.
79
89
80
-
NOTICE: The software has been designed solely for the purpose of providing API design and development guidelines. The software is NOT designed, tested or verified for productive use whatsoever, nor or for any use related to high risk environments, such as health care, highly or fully autonomous driving, power plants, or other critical infrastructures or services.
81
-
82
-
If you want to contact adidas regarding the software, you can mail us at [email protected]_.
90
+
NOTICE: The software has been designed solely for the purpose of providing API design and development guidelines. The software is NOT designed, tested or verified for productive use whatsoever, nor or for any use related to high-risk environments, such as health care, highly or fully autonomous driving, power plants, or other critical infrastructures or services.
83
91
84
92
For further information open the [adidas terms and conditions](https://github.com/adidas/adidas-contribution-guidelines/wiki/Terms-and-conditions) page.
This guide describes steps necessary for testing an API described in a swagger file with the [Dredd API Testing Framework](https://github.com/apiaryio/dredd) in a CI Environment \(Jenkins, TeamCity\).
3
+
This guide describes steps necessary for testing an API described in a swagger file with the [Dredd API Testing Framework](https://github.com/apiaryio/dredd) in a CI Environment (Jenkins, TeamCity).
4
4
5
5
## Environment Prerequisites
6
6
7
7
The following must be available in the CI environment before testing:
8
8
9
-
1.**Node.js** runtime MUST be available in the CI environment:
9
+
1.**Node.js** runtime MUST be available in the CI environment:
10
10
11
-
```text
12
-
$ node -v
13
-
v14.15.5
14
-
```
11
+
```
12
+
$ node -v
13
+
v14.15.5
14
+
```
15
+
2. [**Dredd**](https://github.com/apiaryio/dredd) MUST be installed globally in the CI environment:
15
16
16
-
3.[**Dredd**](https://github.com/apiaryio/dredd) MUST be installed globally in the CI environment:
17
+
```
18
+
$ npm install -g dredd --no-optional
19
+
```
17
20
18
-
```text
19
-
$ npm install -g dredd --no-optional
20
-
```
21
-
22
-
```text
23
-
$ dredd --version
24
-
dredd v14.0.0
25
-
```
21
+
```
22
+
$ dredd --version
23
+
dredd v14.0.0
24
+
```
26
25
27
26
## Testing an API
28
27
29
28
### Test Run Prerequisites
30
29
31
30
To test an API within the CI environment provisioned as mentioned in the environment prerequisites, you will need the following:
32
31
33
-
1. A `swagger.yaml` file with the description of API being tested
34
-
35
-
The OpenAPI Specifciation file should be fetched from [API Design Platform](design-plaform.md). In the case of SwaggerHub API Design Platform, the file can be fetched manually or via their API. Refer to [Integrating with the SwaggerHub API](https://swagger.io/blog/api-development/integrating-with-the-swaggerhub-api/), for details how to use SwaggerHub API.
32
+
1. A `swagger.yaml` file with the description of API being tested
36
33
37
-
Alternativelly this can also be a remote file e.g. SwaggerHub URL, if the API is public its OAS file and reachable from the testing host.
34
+
The OpenAPI Specifciation file should be fetched from [API Design Platform](https://github.com/cesareomacias/api-guidelines/blob/master/rest-api-guidelines/guides/design-plaform.md). In the case of SwaggerHub API Design Platform, the file can be fetched manually or via their API. Refer to [Integrating with the SwaggerHub API](https://swagger.io/blog/api-development/integrating-with-the-swaggerhub-api/), for details how to use SwaggerHub API.
38
35
39
-
2. The host \(address\) of the service being tested
36
+
Alternativelly this can also be a remote file e.g. SwaggerHub URL, if the API is public its OAS file and reachable from the testing host.
0 commit comments