-
Notifications
You must be signed in to change notification settings - Fork 5
/
.spectral.yml
41 lines (38 loc) · 1.02 KB
/
.spectral.yml
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
extends: [[spectral:oas, all]]
rules:
path-item-must-be-ref:
description: Path Item Object value must be a $ref
message: "{{description}}; {{property}} incorrect"
severity: error
resolved: false
given: $.paths.*
then:
- field: $ref
function: truthy
path-item-ref-must-be-file:
description: Path Item must $ref to a file under resources/<resource_name>/
message: "{{description}}; {{value}} incorrect"
severity: error
resolved: false
given: $.paths.*.$ref
then:
function: pattern
functionOptions:
match: "^resources\/[a-zA-Z-_]+\/"
must-use-intl:
description: "Use Intl rather than Int'l"
message: "{{description}}"
severity: warn
given: $..*
then:
function: pattern
functionOptions:
notMatch: "int'l|Int'l"
oas3-valid-media-example:
description: "This format violates OpenAPI 3.1 rules"
message: "{{description}}"
severity: warn
given: "$"
then:
field: example
function: truthy