Skip to content

Commit b146a17

Browse files
committed
docs: update ruleset documentation and running procedures
1 parent 1e4162a commit b146a17

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

spectral/README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,19 @@ A custom ruleset for [Spectral](https://stoplight.io/open-source/spectral/) foll
99
To use this Spectral ruleset add the following to your `.spectral.yaml`:
1010

1111
```yaml
12-
extends: '@rhoas/spectral-ruleset'
12+
extends: "@rhoas/spectral-ruleset"
1313
```
1414
1515
Alternatively you need to create new ruleset
1616
1717
```shell
18-
echo 'extends: @rhoas/spectral-ruleset' > .spectral.yaml
18+
echo 'extends: "@rhoas/spectral-ruleset"' > .spectral.yaml
1919
```
2020
21-
Run the Spectral CLI with npx:
21+
You can run ruleset as follows
2222
2323
```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
3125
rhoasapi lint openapi.yaml
3226
```
3327
@@ -260,5 +254,6 @@ Validate OpenAPI files using the uncompiled ruleset:
260254

261255
```shell
262256
yarn build
263-
yarn spectral-lint ./examples/openapi-valid.yaml
257+
npm link .
258+
rhoasapi lint ./examples/openapi-valid.yaml
264259
```

0 commit comments

Comments
 (0)