-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchainstack-rules.yml
More file actions
66 lines (66 loc) · 1.82 KB
/
chainstack-rules.yml
File metadata and controls
66 lines (66 loc) · 1.82 KB
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
extends:
- spectral:oas
formats:
- oas3
rules:
chainstack-info-contact-required:
description: Chainstack OpenAPI documents must declare the support contact.
severity: warn
given: $.info
then:
field: contact
function: truthy
chainstack-info-license-required:
description: Chainstack OpenAPI documents must declare a license.
severity: warn
given: $.info
then:
field: license
function: truthy
chainstack-server-https-required:
description: Chainstack server URLs must use HTTPS.
severity: error
given: $.servers[*].url
then:
function: pattern
functionOptions:
match: '^https://'
chainstack-operation-summary-title-case:
description: Operation summaries should use Title Case.
severity: warn
given: $.paths[*][*].summary
then:
function: pattern
functionOptions:
match: '^([A-Z][A-Za-z0-9]*)(\s+([A-Z][A-Za-z0-9]*|\d+))*$'
chainstack-operation-tag-required:
description: Every operation should declare at least one tag.
severity: warn
given: $.paths[*][get,post,put,patch,delete]
then:
field: tags
function: length
functionOptions:
min: 1
chainstack-operation-id-required:
description: Every operation must declare an operationId.
severity: error
given: $.paths[*][get,post,put,patch,delete]
then:
field: operationId
function: truthy
chainstack-jsonrpc-post-required:
description: Chainstack RPC node operations must use POST (JSON-RPC over HTTPS).
severity: warn
given: $.paths[*]
then:
function: schema
functionOptions:
schema:
type: object
not:
anyOf:
- required: [get]
- required: [put]
- required: [patch]
- required: [delete]