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
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,12 @@ The IPA validation uses [Spectral](https://docs.stoplight.io/docs/spectral/9ffa0
14
14
To run the IPA validation locally, install necessary dependencies with `npm install` if you haven't already. Then, simply run:
15
15
16
16
```
17
-
npm run ipa-validation
17
+
npm run ipa-validation --file="{your/file/name}"
18
18
```
19
19
20
-
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) on the raw [v2.yaml](https://github.com/mongodb/openapi/blob/main/openapi/.raw/v2.yaml) OpenAPI spec.
20
+
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
+
22
+
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.
21
23
22
24
The Spectral CLI can also be used to run the validation on any valid OpenAPI file (`json` or `yaml`).
23
25
@@ -73,6 +75,8 @@ overrides:
73
75
x-xgen-IPA-xxx-rule: 'off'
74
76
```
75
77
78
+
or by changing the severity in your local `IPAXXX.yaml` file to `off`.
79
+
76
80
### CI/CD Integration
77
81
78
82
#### GitHub Actions Example
@@ -81,7 +85,7 @@ If you use GitHub Actions, you can define a workflow step to include IPA validat
0 commit comments