forked from camaraproject/QualityOnDemand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.openapirc.yml
26 lines (25 loc) · 888 Bytes
/
.openapirc.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
formats:
- oas3
extends:
- spectral:oas
rules:
adidas-paths-kebab-case:
description: All YAML/JSON paths MUST follow kebab-case
severity: error
recommended: true
message: "{{property}} is not kebab-case: {{error}}"
given: $.paths[*]~
then:
function: pattern
functionOptions:
match: "^\/([a-z0-9]+(-[a-z0-9]+)*)?(\/[a-z0-9]+(-[a-z0-9]+)*|\/{.+})*$" # doesn't allow /asasd{asdas}sadas pattern or not closed braces
camara-version:
description: Version must be MAJOR.MINOR.PATCH Adding -rc and -wip as valid suffixes though we should add these to the commonalities if we continue to use them
severity: error
recommended: true
message: "{{property}} is not MAJOR.MINOR.PATCH: {{error}}"
given: $.info.version
then:
function: pattern
functionOptions:
match: ^[0-9]+\.[0-9]+\.[0-9]+(?:-rc|-wip)?$