forked from vrchatapi/specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.spectral.yaml
51 lines (43 loc) · 1.08 KB
/
.spectral.yaml
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
42
43
44
45
46
47
48
49
50
51
formats:
- oas3
extends:
- 'spectral:oas'
rules:
oas3-parameter-description: info
tag-description: hint
# Rules for sub schema
info-license: hint
license-url: hint
oas3-api-servers: hint
info-contact: hint
schema-title:
given: "$.components.schemas[*]"
severity: error
then:
field: title
function: truthy
response-no-inline-schemas:
given: "$.components.responses[*].content.application/json.schema.type"
severity: error
resolved: false
then:
function: pattern
functionOptions:
notMatch: "object"
paths-no-inline-responses:
given: "$.paths[*][get,post,put,delete].responses[*].content.application/json.schema"
severity: error
resolved: false
then:
function: undefined
paths-no-inline-requests:
given: "$.paths[*][get,post,put,delete].requestBody.content.application/json.schema.properties"
severity: error
resolved: false
then:
function: undefined
overrides:
- files:
- "openapi/openapi.yaml#/components/schemas/$ref"
rules:
oas3-unused-component: "off"