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:
Andrzej
2019-10-18 21:06:10 +02:00
committed by GitHub
parent e252e9c45d
commit 91c3b137bf

View File

@@ -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._