@aep_dev/aep-openapi-linter 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +64 -0
- package/aep/0004.yaml +38 -0
- package/aep/0122.yaml +110 -0
- package/aep/0131.yaml +78 -0
- package/aep/0132.yaml +115 -0
- package/aep/0133.yaml +165 -0
- package/aep/0134.yaml +124 -0
- package/aep/0135.yaml +49 -0
- package/aep/0136.yaml +53 -0
- package/aep/0137.yaml +115 -0
- package/aep/0140.yaml +17 -0
- package/aep/0142.yaml +37 -0
- package/aep/0143.yaml +31 -0
- package/aep/0144.yaml +39 -0
- package/aep/0151.yaml +94 -0
- package/aep/0158.yaml +175 -0
- package/aep/0193.yaml +54 -0
- package/functions/aep-142-time-field-type.js +107 -0
- package/functions/operations-endpoint.js +40 -0
- package/functions/parameter-names-unique.js +78 -0
- package/functions/singleton-utils.js +87 -0
- package/functions/skipSingletonsSchema.js +35 -0
- package/functions/standardized-codes.js +50 -0
- package/package.json +60 -0
- package/spectral.yaml +50 -0
package/spectral.yaml
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
extends:
|
|
2
|
+
- spectral:oas
|
|
3
|
+
- ./aep/0004.yaml
|
|
4
|
+
- ./aep/0122.yaml
|
|
5
|
+
- ./aep/0131.yaml
|
|
6
|
+
- ./aep/0132.yaml
|
|
7
|
+
- ./aep/0133.yaml
|
|
8
|
+
- ./aep/0134.yaml
|
|
9
|
+
- ./aep/0135.yaml
|
|
10
|
+
- ./aep/0136.yaml
|
|
11
|
+
- ./aep/0137.yaml
|
|
12
|
+
- ./aep/0140.yaml
|
|
13
|
+
- ./aep/0142.yaml
|
|
14
|
+
- ./aep/0143.yaml
|
|
15
|
+
- ./aep/0144.yaml
|
|
16
|
+
- ./aep/0151.yaml
|
|
17
|
+
- ./aep/0158.yaml
|
|
18
|
+
- ./aep/0193.yaml
|
|
19
|
+
functionsDir: './functions'
|
|
20
|
+
functions:
|
|
21
|
+
- aep-142-time-field-type
|
|
22
|
+
- parameter-names-unique
|
|
23
|
+
- operations-endpoint
|
|
24
|
+
- standardized-codes
|
|
25
|
+
rules:
|
|
26
|
+
openapi-tags: off
|
|
27
|
+
operation-tags: off
|
|
28
|
+
|
|
29
|
+
# Note: The Spectral VSCode extension will not display "hint" messages, so
|
|
30
|
+
# use "info" rather than "hint".
|
|
31
|
+
|
|
32
|
+
aep-parameter-names-unique:
|
|
33
|
+
description: All parameter names for an operation should be case-insensitive unique.
|
|
34
|
+
message: '{{error}}'
|
|
35
|
+
severity: warn
|
|
36
|
+
formats: ['oas2', 'oas3']
|
|
37
|
+
given: $.paths[*]
|
|
38
|
+
then:
|
|
39
|
+
function: parameter-names-unique
|
|
40
|
+
|
|
41
|
+
aep-request-body-optional:
|
|
42
|
+
description: Flag optional request body -- common oversight.
|
|
43
|
+
message: The body parameter is not marked as required.
|
|
44
|
+
severity: info
|
|
45
|
+
formats: ['oas3']
|
|
46
|
+
given:
|
|
47
|
+
- $.paths[*].[put,post,patch].requestBody
|
|
48
|
+
then:
|
|
49
|
+
field: required
|
|
50
|
+
function: truthy
|