Skip to content

Commit 85442bc

Browse files
author
Enda
authored
docs: add Spectral CLI usage step (#12)
1 parent c284dea commit 85442bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

spectral/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ A custom ruleset for [Spectral](https://stoplight.io/open-source/spectral/) foll
44

55
## Using
66

7+
> [npm](https://docs.npmjs.com/) is required to use Spectral.
8+
79
To use this Spectral ruleset add the following to your `.spectral.yaml`:
810

911
```yaml
@@ -12,6 +14,12 @@ rules:
1214
# add your custom rules here
1315
```
1416

17+
Run the Spectral CLI:
18+
19+
```shell
20+
npx @stoplight/spectral ./path/to/openapi.yaml
21+
```
22+
1523
## Rules
1624

1725
The RHOAS ruleset extends the Spectral built-in "oas" ruleset (except `operation-tags`, `openapi-tags`). You can see the full list of rules from that ruleset [here](https://meta.stoplight.io/docs/spectral/docs/reference/openapi-rules.md)
@@ -241,4 +249,4 @@ Validate OpenAPI files using the uncompiled ruleset:
241249
```shell
242250
yarn build
243251
yarn spectral-lint ./examples/openapi-valid.yaml
244-
```
252+
```

0 commit comments

Comments
 (0)