mirror of
https://github.com/adidas/api-guidelines.git
synced 2025-10-25 15:19:19 +00:00
Add rulesets to readme
References the list of rulesets and adds a description on how to use spectral with provided rulesets.
This commit is contained in:
18
README.md
18
README.md
@@ -41,6 +41,24 @@ The CAPITALIZED words throughout these guidelines have a special meaning:
|
||||
|
||||
Refer to [RFC2119](https://www.ietf.org/rfc/rfc2119) for details.
|
||||
|
||||
### Enforcing API Guidelines over your OpenAPI Specification
|
||||
|
||||
In the `ruleset.md` file you can find a digest of enforceable rules over 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).
|
||||
|
||||
To install Spectral you will need Node.js and a package manager (npm or yarn).
|
||||
|
||||
```
|
||||
npm install -g @stoplight/spectral
|
||||
|
||||
# OR
|
||||
|
||||
yarn global add @stoplight/spectral
|
||||
```
|
||||
|
||||
Once installed, to verify your OAS file with spectral execute `spectral lint PATH_TO_YOUR_OAS -r spectral.yml`
|
||||
|
||||
For further documentation on Spectral refer to their [documentation](https://stoplight.io/p/docs/gh/stoplightio/spectral/README.md).
|
||||
|
||||
### Questions & Comments
|
||||
|
||||
_Please contact_ [_Zdenek.Nemec@externals.adidas-group.com_](mailto:Zdenek.Nemec@externals.adidas-group.com) or [_andrzej.jarzyna@adidas.com_](mailto:andrzej.jarzyna@adidas.com) _in the case of questions._
|
||||
|
||||
Reference in New Issue
Block a user