Skip to content

Commit f06425d

Browse files
committed
fix rulesets and the templates
1 parent 7c4e84e commit f06425d

File tree

4 files changed

+167
-19
lines changed

4 files changed

+167
-19
lines changed

docs/@v2/rules/minimal.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Warnings:
2424
- [no-example-value-and-externalValue](./oas/no-example-value-and-externalValue.md)
2525
- [no-identical-paths](./oas/no-identical-paths.md)
2626
- [no-invalid-media-type-examples](./oas/no-invalid-media-type-examples.md)
27-
- [no-invalid-tag-parents](./oas/no-invalid-tag-parents.md)
2827
- [no-path-trailing-slash](./oas/no-path-trailing-slash.md)
2928
- [no-required-schema-properties-undefined](./common/no-required-schema-properties-undefined.md)
3029
- [no-schema-type-mismatch](./common/no-schema-type-mismatch.md)
@@ -43,6 +42,8 @@ Warnings:
4342
- [path-parameters-defined](./oas/path-parameters-defined.md)
4443
- [security-defined](./oas/security-defined.md)
4544
- [spec-components-invalid-map-name](./oas/spec-components-invalid-map-name.md)
45+
- [spec-no-invalid-encoding-combinations](./oas/spec-no-invalid-encoding-combinations.md)
46+
- [spec-no-invalid-tag-parents](./oas/spec-no-invalid-tag-parents.md)
4647
- [tag-description](./oas/tag-description.md)
4748

4849
A copy-pastable version of this ruleset is available as a [ruleset template](./ruleset-templates.md).

docs/@v2/rules/recommended.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Errors:
1212
- [no-enum-type-mismatch](./common/no-enum-type-mismatch.md)
1313
- [no-example-value-and-externalValue](./oas/no-example-value-and-externalValue.md)
1414
- [no-identical-paths](./oas/no-identical-paths.md)
15-
- [no-invalid-tag-parents](./oas/no-invalid-tag-parents.md)
1615
- [no-path-trailing-slash](./oas/no-path-trailing-slash.md)
1716
- [no-schema-type-mismatch](./common/no-schema-type-mismatch.md)
1817
- [no-server-trailing-slash](./oas/no-server-trailing-slash.md)
@@ -34,6 +33,9 @@ Errors:
3433
- [sourceDescription-type](./arazzo/sourceDescriptions-type.md)
3534
- [sourceDescriptions-not-empty](./arazzo/sourceDescriptions-not-empty.md)
3635
- [spec-components-invalid-map-name](./oas/spec-components-invalid-map-name.md)
36+
- [spec-example-values](./oas/spec-example-values.md)
37+
- [spec-no-invalid-encoding-combinations](./oas/spec-no-invalid-encoding-combinations.md)
38+
- [spec-no-invalid-tag-parents](./oas/spec-no-invalid-tag-parents.md)
3739
- [stepId-unique](./arazzo/stepId-unique.md)
3840
- [struct](./common/struct.md)
3941
- [workflow-dependsOn](./arazzo/workflow-dependsOn.md)
@@ -57,6 +59,7 @@ Warnings:
5759
- [operation-4xx-response](./oas/operation-4xx-response.md)
5860
- [operation-operationId](./oas/operation-operationId.md)
5961
- [requestBody-replacements-unique](./arazzo/requestBody-replacements-unique.md)
62+
- [spec-discriminator-defaultMapping](./oas/spec-discriminator-defaultMapping.md)
6063
- [step-onFailure-unique](./arazzo/step-onFailure-unique.md)
6164
- [step-onSuccess-unique](./arazzo/step-onSuccess-unique.md)
6265
- [tag-description](./oas/tag-description.md)

docs/@v2/rules/ruleset-templates.md

Lines changed: 157 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ More information and examples for individual rules can be found in the [built-in
1414

1515
The minimal rulesets are a decent baseline that you can use to selective enable more rules or extend rulesets from.
1616

17-
<!-- FIXME: update according to recommended/minimal/spec &c. -->
18-
19-
### Minimal ruleset: OpenAPI 3.1/3.2
17+
### Minimal ruleset: OpenAPI 3.2
2018

2119
```yaml
2220
rules:
@@ -60,7 +58,6 @@ rules:
6058
no-server-example.com: warn
6159
no-server-trailing-slash: error
6260
no-empty-servers: warn
63-
no-example-value-and-externalValue: warn
6461
no-unused-components: warn
6562
no-undefined-server-variable: warn
6663
no-server-variables-empty-enum: error
@@ -82,6 +79,69 @@ rules:
8279
spec-no-invalid-encoding-combinations: warn
8380
```
8481
82+
### Minimal ruleset: OpenAPI 3.1
83+
84+
```yaml
85+
rules:
86+
info-contact: off
87+
info-license: off
88+
info-license-strict: off
89+
tag-description: warn
90+
tags-alphabetical: off
91+
parameter-description: off
92+
no-path-trailing-slash: warn
93+
no-identical-paths: warn
94+
no-ambiguous-paths: warn
95+
path-declaration-must-exist: warn
96+
path-not-include-query: warn
97+
path-parameters-defined: warn
98+
operation-description: off
99+
operation-2xx-response: warn
100+
operation-4xx-response: off
101+
operation-operationId: warn
102+
operation-summary: warn
103+
operation-operationId-unique: warn
104+
operation-parameters-unique: warn
105+
operation-tag-defined: off
106+
security-defined: warn
107+
operation-operationId-url-safe: warn
108+
operation-singular-tag: off
109+
no-unresolved-refs: error
110+
paths-kebab-case: off
111+
struct: error
112+
spec-strict-refs: off
113+
no-http-verbs-in-paths: off
114+
no-invalid-parameter-examples: off
115+
no-invalid-schema-examples: off
116+
path-http-verbs-order: off
117+
path-params-defined: off
118+
required-string-property-missing-min-length: off
119+
response-contains-header: off
120+
path-segment-plural: off
121+
scalar-property-missing-example: off
122+
no-invalid-media-type-examples: warn
123+
no-server-example.com: warn
124+
no-server-trailing-slash: error
125+
no-empty-servers: warn
126+
no-example-value-and-externalValue: warn
127+
no-unused-components: warn
128+
no-undefined-server-variable: warn
129+
no-server-variables-empty-enum: error
130+
spec-components-invalid-map-name: warn
131+
boolean-parameter-prefixes: off
132+
component-name-unique: off
133+
operation-4xx-problem-details-rfc7807: off
134+
request-mime-type: off
135+
response-contains-property: off
136+
response-mime-type: off
137+
array-parameter-serialization: off
138+
no-duplicated-tag-names: off
139+
no-required-schema-properties-undefined: warn
140+
no-schema-type-mismatch: warn
141+
no-enum-type-mismatch: warn
142+
spec-example-values: off
143+
```
144+
85145
### Minimal ruleset: OpenAPI 3.0
86146
87147
```yaml
@@ -143,6 +203,7 @@ rules:
143203
no-required-schema-properties-undefined: warn
144204
no-schema-type-mismatch: warn
145205
no-enum-type-mismatch: warn
206+
spec-example-values: off
146207
```
147208
148209
### Minimal ruleset: OpenAPI 2.0
@@ -240,14 +301,14 @@ rules:
240301
workflowId-unique: error
241302
stepId-unique: error
242303
sourceDescription-name-unique: off
304+
sourceDescriptions-not-empty: off
243305
workflow-dependsOn: off
244306
parameters-unique: off
245307
step-onSuccess-unique: off
246308
step-onFailure-unique: off
247309
respect-supported-versions: off
248310
requestBody-replacements-unique: off
249311
no-criteria-xpath: off
250-
no-actions-type-end: off
251312
criteria-unique: off
252313
no-x-security-scheme-name-without-openapi: off
253314
x-security-scheme-required-values: off
@@ -263,7 +324,7 @@ The default behavior is to use a recommended ruleset.
263324
The recommended rulesets for each format are listed below.
264325
There is also a "recommended-strict" ruleset which is identical but with all `warn` settings changed to `error`.
265326

266-
### Recommended ruleset: OpenAPI 3.1/3.2
327+
### Recommended ruleset: OpenAPI 3.2
267328

268329
```yaml
269330
rules:
@@ -295,14 +356,29 @@ rules:
295356
struct: error
296357
spec-strict-refs: off
297358
no-http-verbs-in-paths: off
298-
no-invalid-parameter-examples: off
299-
no-invalid-schema-examples: off
359+
no-invalid-parameter-examples: warn
360+
no-invalid-schema-examples: warn
300361
path-http-verbs-order: off
301-
path-params-defined: off
362+
path-params-defined: error
302363
path-segment-plural: off
303364
required-string-property-missing-min-length: off
304365
response-contains-header: off
305366
scalar-property-missing-example: off
367+
no-invalid-media-type-examples: warn
368+
no-server-example.com: warn
369+
no-server-trailing-slash: error
370+
no-empty-servers: error
371+
no-unused-components: warn
372+
no-undefined-server-variable: error
373+
no-server-variables-empty-enum: error
374+
spec-components-invalid-map-name: error
375+
boolean-parameter-prefixes: off
376+
component-name-unique: off
377+
operation-4xx-problem-details-rfc7807: off
378+
request-mime-type: off
379+
response-contains-property: off
380+
response-mime-type: off
381+
array-parameter-serialization: off
306382
no-duplicated-tag-names: warn
307383
no-required-schema-properties-undefined: warn
308384
no-schema-type-mismatch: error
@@ -313,6 +389,69 @@ rules:
313389
spec-no-invalid-encoding-combinations: error
314390
```
315391

392+
### Recommended ruleset: OpenAPI 3.1
393+
394+
```yaml
395+
rules:
396+
info-contact: off
397+
info-license: warn
398+
info-license-strict: warn
399+
tag-description: warn
400+
tags-alphabetical: off
401+
parameter-description: off
402+
no-path-trailing-slash: error
403+
no-identical-paths: error
404+
no-ambiguous-paths: warn
405+
path-declaration-must-exist: error
406+
path-not-include-query: error
407+
path-parameters-defined: error
408+
operation-description: off
409+
operation-2xx-response: warn
410+
operation-4xx-response: warn
411+
operation-operationId: warn
412+
operation-summary: error
413+
operation-operationId-unique: error
414+
operation-operationId-url-safe: error
415+
operation-parameters-unique: error
416+
operation-tag-defined: off
417+
security-defined: error
418+
operation-singular-tag: off
419+
no-unresolved-refs: error
420+
paths-kebab-case: off
421+
struct: error
422+
spec-strict-refs: off
423+
no-http-verbs-in-paths: off
424+
no-invalid-parameter-examples: warn
425+
no-invalid-schema-examples: warn
426+
path-http-verbs-order: off
427+
path-params-defined: error
428+
path-segment-plural: off
429+
required-string-property-missing-min-length: off
430+
response-contains-header: off
431+
scalar-property-missing-example: off
432+
no-invalid-media-type-examples: warn
433+
no-server-example.com: warn
434+
no-server-trailing-slash: error
435+
no-empty-servers: error
436+
no-example-value-and-externalValue: error
437+
no-unused-components: warn
438+
no-undefined-server-variable: error
439+
no-server-variables-empty-enum: error
440+
spec-components-invalid-map-name: error
441+
boolean-parameter-prefixes: off
442+
component-name-unique: off
443+
operation-4xx-problem-details-rfc7807: off
444+
request-mime-type: off
445+
response-contains-property: off
446+
response-mime-type: off
447+
array-parameter-serialization: off
448+
no-duplicated-tag-names: warn
449+
no-required-schema-properties-undefined: warn
450+
no-schema-type-mismatch: error
451+
no-enum-type-mismatch: error
452+
spec-example-values: off
453+
```
454+
316455
### Recommended ruleset: OpenAPI 3.0
317456

318457
```yaml
@@ -346,10 +485,10 @@ rules:
346485
struct: error
347486
spec-strict-refs: off
348487
no-http-verbs-in-paths: off
349-
no-invalid-parameter-examples: off
350-
no-invalid-schema-examples: off
488+
no-invalid-parameter-examples: warn
489+
no-invalid-schema-examples: warn
351490
path-http-verbs-order: off
352-
path-params-defined: off
491+
path-params-defined: error
353492
path-segment-plural: off
354493
required-string-property-missing-min-length: off
355494
response-contains-header: off
@@ -374,6 +513,7 @@ rules:
374513
no-required-schema-properties-undefined: warn
375514
no-schema-type-mismatch: error
376515
no-enum-type-mismatch: error
516+
spec-example-values: off
377517
```
378518

379519
### Recommended ruleset: OpenAPI 2.0
@@ -408,10 +548,10 @@ rules:
408548
struct: error
409549
spec-strict-refs: off
410550
no-http-verbs-in-paths: off
411-
no-invalid-parameter-examples: off
412-
no-invalid-schema-examples: off
551+
no-invalid-parameter-examples: warn
552+
no-invalid-schema-examples: warn
413553
path-http-verbs-order: off
414-
path-params-defined: off
554+
path-params-defined: error
415555
path-segment-plural: off
416556
required-string-property-missing-min-length: off
417557
response-contains-header: off
@@ -471,18 +611,18 @@ rules:
471611
workflowId-unique: error
472612
stepId-unique: error
473613
sourceDescription-name-unique: error
614+
sourceDescriptions-not-empty: error
474615
workflow-dependsOn: error
475616
parameters-unique: error
476617
step-onSuccess-unique: warn
477618
step-onFailure-unique: warn
478619
respect-supported-versions: off
479620
requestBody-replacements-unique: warn
480621
no-criteria-xpath: off
481-
no-actions-type-end: warn
482622
criteria-unique: warn
483623
no-x-security-scheme-name-without-openapi: off
484624
x-security-scheme-required-values: off
485-
no-x-security-scheme-name-in-workflow: 'off',
625+
no-x-security-scheme-name-in-workflow: off
486626
no-required-schema-properties-undefined: warn
487627
no-schema-type-mismatch: error
488628
no-enum-type-mismatch: error

docs/@v2/rules/spec-ruleset.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ All the rules are of severity `error`:
2727
- [sourceDescription-type](./arazzo/sourceDescriptions-type.md)
2828
- [sourceDescriptions-not-empty](./arazzo/sourceDescriptions-not-empty.md)
2929
- [spec-components-invalid-map-name](./oas/spec-components-invalid-map-name.md)
30+
- [spec-discriminator-defaultMapping](./oas/spec-discriminator-defaultMapping.md)
31+
- [spec-example-values](./oas/spec-example-values.md)
32+
- [spec-no-invalid-encoding-combinations](./oas/spec-no-invalid-encoding-combinations.md)
33+
- [spec-no-invalid-tag-parents](./oas/spec-no-invalid-tag-parents.md)
3034
- [spec-strict-refs](./oas/spec-strict-refs.md)
3135
- [step-onFailure-unique](./arazzo/step-onFailure-unique.md)
3236
- [step-onSuccess-unique](./arazzo/step-onSuccess-unique.md)

0 commit comments

Comments
 (0)