File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -9,27 +9,24 @@ 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 : ' node_modules/ @rhoas/spectral-ruleset/dist/ruleset.yaml '
13
13
` ` `
14
14
15
15
Alternatively you need to create new ruleset
16
-
17
- `
18
- echo "extends : ' @rhoas/spectral-ruleset' " > .spectral.yaml
19
- `
20
-
21
- Run the Spectral CLI:
22
-
23
- ```shell
24
- npm install -g @stoplight/[email protected]
25
- spectral lint ./path/to/openapi.yaml
16
+ ` ` `
17
+ echo 'extends : node_modules/@rhoas/spectral-ruleset/dist/ruleset.yaml' > .spectral.yaml
26
18
` ` `
27
19
28
- or with yarn:
20
+ Run the Spectral CLI with yarn:
29
21
` ` ` shell
30
- yarn add global @stoplight /spectral-[email protected]
22
+ yarn add @rhoas /spectral-ruleset
31
23
yarn spectral lint ./path/to/openapi.yaml
32
24
```
25
+ or npm:
26
+ ``` shell
27
+ npm i -g @rhoas/spectral-ruleset
28
+ spectral lint ./path/to/openapi.yaml
29
+ ```
33
30
34
31
## Rules
35
32
Original file line number Diff line number Diff line change 11
11
no-$ref-siblings : warn
12
12
oas3-valid-media-example : warn
13
13
14
-
15
14
rhoas-external-$ref :
16
15
given : " $..['$ref']"
17
16
severity : error
You can’t perform that action at this time.
0 commit comments