/
recommended.ts
96 lines (94 loc) · 3.24 KB
/
recommended.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import type { PluginStyleguideConfig } from './types';
const recommended: PluginStyleguideConfig<'built-in'> = {
rules: {
'info-contact': 'off',
'info-license': 'warn',
'info-license-url': 'warn',
'tag-description': 'warn',
'tags-alphabetical': 'off',
'parameter-description': 'off',
'no-path-trailing-slash': 'error',
'no-identical-paths': 'error',
'no-ambiguous-paths': 'warn',
'path-declaration-must-exist': 'error',
'path-not-include-query': 'error',
'path-parameters-defined': 'error',
'operation-description': 'off',
'operation-2xx-response': 'warn',
'operation-4xx-response': 'warn',
'operation-operationId': 'warn',
'operation-summary': 'error',
'operation-operationId-unique': 'error',
'operation-operationId-url-safe': 'error',
'operation-parameters-unique': 'error',
'operation-tag-defined': 'off',
'security-defined': 'error',
'operation-singular-tag': 'off',
'no-unresolved-refs': 'error',
'no-enum-type-mismatch': 'error',
'paths-kebab-case': 'off',
spec: 'error',
'spec-strict-refs': 'off',
'no-http-verbs-in-paths': 'off',
'no-invalid-parameter-examples': 'off',
'no-invalid-schema-examples': 'off',
'path-excludes-patterns': 'off',
'path-http-verbs-order': 'off',
'path-params-defined': 'off',
'path-segment-plural': 'off',
'required-string-property-missing-min-length': 'off',
'response-contains-header': 'off',
'scalar-property-missing-example': 'off',
'no-required-schema-properties-undefined': 'off',
},
oas2Rules: {
'boolean-parameter-prefixes': 'off',
'request-mime-type': 'off',
'response-contains-property': 'off',
'response-mime-type': 'off',
},
oas3_0Rules: {
'no-invalid-media-type-examples': {
severity: 'warn',
allowAdditionalProperties: false,
},
'no-server-example.com': 'warn',
'no-server-trailing-slash': 'error',
'no-empty-servers': 'error',
'no-example-value-and-externalValue': 'error',
'no-unused-components': 'warn',
'no-undefined-server-variable': 'error',
'no-server-variables-empty-enum': 'error',
'spec-components-invalid-map-name': 'error',
'boolean-parameter-prefixes': 'off',
'component-name-unique': 'off',
'operation-4xx-problem-details-rfc7807': 'off',
'request-mime-type': 'off',
'response-contains-property': 'off',
'response-mime-type': 'off',
'array-parameter-serialization': 'off',
},
oas3_1Rules: {
'no-invalid-media-type-examples': 'warn',
'no-server-example.com': 'warn',
'no-server-trailing-slash': 'error',
'no-empty-servers': 'error',
'no-example-value-and-externalValue': 'error',
'no-unused-components': 'warn',
'no-undefined-server-variable': 'error',
'no-server-variables-empty-enum': 'error',
'spec-components-invalid-map-name': 'error',
'boolean-parameter-prefixes': 'off',
'component-name-unique': 'off',
'operation-4xx-problem-details-rfc7807': 'off',
'request-mime-type': 'off',
'response-contains-property': 'off',
'response-mime-type': 'off',
'array-parameter-serialization': 'off',
},
async2Rules: {
'channels-kebab-case': 'off',
'no-channel-trailing-slash': 'off',
},
};
export default recommended;