File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -9,25 +9,19 @@ A custom ruleset for [Spectral](https://stoplight.io/open-source/spectral/) foll
9
9
To use this Spectral ruleset add the following to your ` .spectral.yaml ` :
10
10
11
11
``` yaml
12
- extends : ' @rhoas/spectral-ruleset'
12
+ extends : " @rhoas/spectral-ruleset"
13
13
` ` `
14
14
15
15
Alternatively you need to create new ruleset
16
16
17
17
` ` ` shell
18
- echo 'extends : @rhoas/spectral-ruleset' > .spectral.yaml
18
+ echo 'extends : " @rhoas/spectral-ruleset" ' > .spectral.yaml
19
19
```
20
20
21
- Run the Spectral CLI with npx:
21
+ You can run ruleset as follows
22
22
23
23
```shell
24
- npx @rhoas/spectral-ruleset lint openapi.yaml
25
- ```
26
-
27
- or npm global:
28
-
29
- ``` shell
30
- npm i -g npx @rhoas/spectral-ruleset
24
+ npm install -g @rhoas/spectral-ruleset
31
25
rhoasapi lint openapi.yaml
32
26
```
33
27
@@ -260,5 +254,6 @@ Validate OpenAPI files using the uncompiled ruleset:
260
254
261
255
` ` ` shell
262
256
yarn build
263
- yarn spectral-lint ./examples/openapi-valid.yaml
257
+ npm link .
258
+ rhoasapi lint ./examples/openapi-valid.yaml
264
259
` ` `
You can’t perform that action at this time.
0 commit comments