forked from vtex/openapi-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.spectral.yml
37 lines (33 loc) · 1.18 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
extends: ["spectral:oas"]
rules:
path-params: off
operation-operationId: off
e-mail-in-description:
description: Should use email instead of e-mail in descriptions
severity: warn
given: "$..*[?(@property === 'description')]"
then:
function: pattern
functionOptions:
notMatch: "\\be-mail\\b"
should-include-operation-summary:
description: Operation summary should be included
severity: warn
given: "$.paths.*[?( @property === 'get' || @property === 'put' || @property === 'post' || @property === 'delete' || @property === 'options' || @property === 'head' || @property === 'patch' || @property === 'trace' )]"
then:
- field: "summary"
function: truthy
should-include-response-examples:
description: At least one example should be included for each API response
severity: warn
given: "$.paths..responses.*.content.*"
then:
- field: "example"
function: truthy
should-include-response-schema:
description: At least one example should be included for each API response
severity: warn
given: "$.paths..responses.*.content.*"
then:
- field: "schema"
function: truthy