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
Copy file name to clipboardExpand all lines: tools/spectral/ipa/README.md
+35-11Lines changed: 35 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,20 @@
2
2
3
3
The IPA validation uses [Spectral](https://docs.stoplight.io/docs/spectral/9ffa04e052cc1-spectral-cli) to validate the [MongoDB Atlas Admin API OpenAPI Specification](https://github.com/mongodb/openapi/tree/main/openapi). The rules cover MongoDB's [Improvement Proposal for APIs](https://mongodb.github.io/ipa/) (IPA), which are best-practices for API design.
@@ -14,25 +28,32 @@ The IPA validation uses [Spectral](https://docs.stoplight.io/docs/spectral/9ffa0
14
28
To run the IPA validation locally, install necessary dependencies with `npm install` if you haven't already. Then, simply run:
15
29
16
30
```
17
-
npm run ipa-validation --file="{your/file/name}"
31
+
npm run ipa-validation
18
32
```
19
33
20
34
This command will run Spectral CLI for the ruleset [ipa-spectral.yaml](https://github.com/mongodb/openapi/blob/main/tools/spectral/ipa/ipa-spectral.yaml).
21
35
22
36
For use on the OpenAPI specification, run `npm run ipa-validation` from the root directory of the OpenAPI repo, which will validate the raw [v2.yaml](https://github.com/mongodb/openapi/blob/main/openapi/.raw/v2.yaml) OpenAPI spec.
23
37
24
-
The Spectral CLI can also be used to run the validation on any valid OpenAPI file (`json` or `yaml`).
0 commit comments