-
Notifications
You must be signed in to change notification settings - Fork 12
/
.spectral.yml
26 lines (26 loc) · 1.04 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
extends: "spectral:oas"
# Work around broken rules: https://github.com/stoplightio/spectral/issues/1972
except:
"openapi.yaml#/paths/~1udf_runtimes/get/responses/200/content/application~1json/example":
- oas3-valid-schema-example
rules:
contact-properties: true
tag-description: true
oas3-parameter-description: true
oas3-unused-component: false # Broken: https://github.com/stoplightio/spectral/issues/1271
operation-summary-formatted:
description: Operation `summary` should start with upper case and not end with a dot.
given: '$.paths.*[?( @property === ''get'' || @property === ''put'' || @property === ''post'' || @property === ''delete'' || @property === ''options'' || @property === ''head'' || @property === ''patch'' || @property === ''trace'' )]'
then:
field: summary
function: pattern
functionOptions:
match: '^[A-Z].*[^\.]$'
tags:
- operation
operation-id-kebab-case:
given: "$..operationId"
then:
function: pattern
functionOptions:
match: ^[a-z][a-z0-9\-]*$