-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
.spectral.yml
39 lines (36 loc) · 1010 Bytes
/
.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
extends: spectral:oas
rules:
info-contact: off
success-response:
description: All operations should have a success response.
message: Operation is missing a success response.
severity: warn
given: $.paths.*.*.responses
then:
function: schema
functionOptions:
schema:
anyOf:
- required: ["200"]
- required: ["201"]
- required: ["204"]
error-response:
description: All operations should have a error response.
message: Operation is missing a error response.
severity: warn
given: $.paths.*.*.responses
then:
function: schema
functionOptions:
schema:
anyOf:
- required: ["400"]
- required: ["404"]
parameter-description:
description: All parameters should have a description
message: Parameter is missing a description.
severity: warn
given: $.paths.*.*.parameters[*]
then:
field: description
function: truthy