Skip to content

Commit 84a6631

Browse files
committed
docs: doc updates
1 parent 4dc7a11 commit 84a6631

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

spectral/README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ echo "extends: '@rhoas/spectral-ruleset'" > .spectral.yaml
2121
Run the Spectral CLI:
2222
2323
```shell
24-
npm install -g @stoplight/spectral@5.9.0
24+
npm install -g @stoplight/spectral[email protected]
2525
spectral lint ./path/to/openapi.yaml
2626
```
2727
28+
or with yarn:
29+
```shell
30+
yarn add global @stoplight/[email protected]
31+
yarn spectral lint ./path/to/openapi.yaml
32+
```
33+
2834
## Rules
2935
3036
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)
@@ -86,12 +92,11 @@ info:
8692

8793
### rhoas-path-regexp
8894

89-
All paths must match the specified regular expression: `\/api\/([a-z_]*){1,}(\/v[0-9]*(alpha|beta)?)(\/{?[a-z_]*}?){0,}$`.
95+
All paths must match the specified regular expression: `\/api\/v.*\/.*$`.
9096

9197
- The first segment must be `/api`
92-
- The second segment can only contain alphabetical characters and underscores "_"
93-
- The third segment must specify the API version. This can be a major version such as `v1` or a channel-version such as `v1beta`, `v1alpha`.
94-
- All following segments must follow `camel_case` and can only contain alphabetical characters.
98+
- The second segment must specify the API version. This can be a major version such as `v1` or a channel-version such as `v1beta`, `v1alpha`.
99+
- All following segments must follow `snake_case` and can only contain alphabetical characters.
95100

96101
**Recommended**: Yes
97102
**Severity**: warning
@@ -102,7 +107,7 @@ The content type for all responses must be `application/json`.
102107

103108
**Recommended**: Yes
104109

105-
**Severity**: error
110+
**Severity**: warning
106111

107112
### rhoas-error-response
108113

@@ -132,16 +137,16 @@ properties:
132137

133138
**Severity**: error
134139

135-
### rhoas-schema-name-camel-case
140+
### rhoas-schema-name-pascal-case
136141

137-
All JSON schema objects defined in `components.schemas` must follow `CamelCase`.
142+
All JSON schema objects defined in `components.schemas` must follow `PascalCase`.
138143

139144
**Recommended**: Yes
140145

141146
**Severity**: warning
142147
### rhoas-schema-properties-snake-case
143148

144-
All JSON schema properties defined must follow `camel_case`.
149+
All JSON schema properties defined must follow `snake_case`.
145150

146151
**Recommended**: Yes
147152

0 commit comments

Comments
 (0)