File tree 2 files changed +37
-9
lines changed
2 files changed +37
-9
lines changed Original file line number Diff line number Diff line change
1
+ openapi : " 3.0.0"
2
+ info :
3
+ version : 1.0.0
4
+ title : API Fixture
5
+ description : API fixture description
6
+ license :
7
+ name : Apache2
8
+ contact :
9
+
10
+ servers :
11
+ - url : https://api.example.com/v1
12
+ tags :
13
+ - name : Test
14
+ description : Test tag
15
+ paths :
16
+ /tests :
17
+ get :
18
+ summary : Test operation
19
+ description : Test operation description
20
+ operationId : test
21
+ tags :
22
+ - Test
23
+ responses :
24
+ " 200 " :
25
+ description : Response description
Original file line number Diff line number Diff line change @@ -120,13 +120,16 @@ rules:
120
120
then :
121
121
field : content
122
122
function : falsy
123
- require-body :
124
- severity : error
125
- description : 200 response must have a body. Use 201/204 otherwise.
126
- given : $..responses.200
127
- then :
128
- field : content
129
- function : truthy
123
+ # requiring a body fails for image/json and cannot because because of a spectral
124
+ # bug that prevents image/jpeg with type:"string" from parsing.
125
+ # TODO: Readd this if spectral ever fixes that bug.
126
+ # require-body:
127
+ # severity: error
128
+ # description: 200 response must have a body. Use 201/204 otherwise.
129
+ # given: $..responses.200
130
+ # then:
131
+ # field: content
132
+ # function: truthy
130
133
delete-response :
131
134
severity : error
132
135
description : Delete should return an HTTP 204
@@ -154,10 +157,10 @@ rules:
154
157
then :
155
158
function : pattern
156
159
functionOptions :
157
- match : ' /^([A-Z][a-z0-9]-)*([A-Z][a-z0-9])+/'
160
+ match : " /^([A-Z][a-z0-9]-)*([A-Z][a-z0-9])+/"
158
161
params-lower-snake-case :
159
162
severity : error
160
- message : ' `{{value}}` must follow `snake` notation'
163
+ message : " `{{value}}` must follow `snake` notation"
161
164
given : " $..parameters[?(@.in == 'query' || @ == 'path')].name"
162
165
then :
163
166
function : casing
You can’t perform that action at this time.
0 commit comments