@@ -22,18 +22,6 @@ class OpenApiGenerationTest extends FunSuite {
2222 | "paths": {
2323 | "/": {
2424 | "put": {
25- | "responses": {
26- | "200": {
27- | "description": "Serious response",
28- | "content": {
29- | "application/json": {
30- | "schema": {
31- | "type": "string"
32- | }
33- | }
34- | }
35- | }
36- | },
3725 | "operationId": "singleBodyPut",
3826 | "requestBody": {
3927 | "description": "Serious body",
@@ -50,23 +38,24 @@ class OpenApiGenerationTest extends FunSuite {
5038 | }
5139 | },
5240 | "required": true
53- | }
54- | }
55- | },
56- | "/a/b/{p1}/p1/{p2}": {
57- | "description": "path with a followed by b",
58- | "get": {
41+ | },
5942 | "responses": {
6043 | "200": {
44+ | "description": "Serious response",
6145 | "content": {
6246 | "application/json": {
6347 | "schema": {
64- | "$ref ": "#/components/schemas/RestEntity "
48+ | "type ": "string "
6549 | }
6650 | }
6751 | }
6852 | }
69- | },
53+ | }
54+ | }
55+ | },
56+ | "/a/b/{p1}/p1/{p2}": {
57+ | "description": "path with a followed by b",
58+ | "get": {
7059 | "description": "A really complex GET operation",
7160 | "operationId": "complexGet",
7261 | "parameters": [
@@ -123,14 +112,22 @@ class OpenApiGenerationTest extends FunSuite {
123112 | "default": "q2def"
124113 | }
125114 | }
126- | ]
115+ | ],
116+ | "responses": {
117+ | "200": {
118+ | "content": {
119+ | "application/json": {
120+ | "schema": {
121+ | "$ref": "#/components/schemas/RestEntity"
122+ | }
123+ | }
124+ | }
125+ | }
126+ | }
127127 | }
128128 | },
129129 | "/complexParams": {
130130 | "post": {
131- | "responses": {
132- | "204": {}
133- | },
134131 | "operationId": "complexParams",
135132 | "requestBody": {
136133 | "content": {
@@ -157,11 +154,25 @@ class OpenApiGenerationTest extends FunSuite {
157154 | }
158155 | },
159156 | "required": true
157+ | },
158+ | "responses": {
159+ | "204": {}
160160 | }
161161 | }
162162 | },
163163 | "/customResponse": {
164164 | "post": {
165+ | "operationId": "customResponse",
166+ | "parameters": [
167+ | {
168+ | "name": "value",
169+ | "in": "query",
170+ | "required": true,
171+ | "schema": {
172+ | "type": "string"
173+ | }
174+ | }
175+ | ],
165176 | "responses": {
166177 | "200": {
167178 | "headers": {
@@ -179,41 +190,19 @@ class OpenApiGenerationTest extends FunSuite {
179190 | }
180191 | }
181192 | }
182- | },
183- | "operationId": "customResponse",
184- | "parameters": [
185- | {
186- | "name": "value",
187- | "in": "query",
188- | "required": true,
189- | "schema": {
190- | "type": "string"
191- | }
192- | }
193- | ]
193+ | }
194194 | }
195195 | },
196196 | "/failingGet": {
197197 | "get": {
198+ | "operationId": "failingGet",
198199 | "responses": {
199200 | "204": {}
200- | },
201- | "operationId": "failingGet"
201+ | }
202202 | }
203203 | },
204204 | "/formPost": {
205205 | "post": {
206- | "responses": {
207- | "200": {
208- | "content": {
209- | "application/json": {
210- | "schema": {
211- | "type": "string"
212- | }
213- | }
214- | }
215- | }
216- | },
217206 | "operationId": "formPost",
218207 | "parameters": [
219208 | {
@@ -247,30 +236,30 @@ class OpenApiGenerationTest extends FunSuite {
247236 | }
248237 | },
249238 | "required": true
239+ | },
240+ | "responses": {
241+ | "200": {
242+ | "content": {
243+ | "application/json": {
244+ | "schema": {
245+ | "type": "string"
246+ | }
247+ | }
248+ | }
249+ | }
250250 | }
251251 | }
252252 | },
253253 | "/moreFailingGet": {
254254 | "get": {
255+ | "operationId": "moreFailingGet",
255256 | "responses": {
256257 | "204": {}
257- | },
258- | "operationId": "moreFailingGet"
258+ | }
259259 | }
260260 | },
261261 | "/multiParamPost/{p1}/p1/{p2}": {
262262 | "post": {
263- | "responses": {
264- | "200": {
265- | "content": {
266- | "application/json": {
267- | "schema": {
268- | "$ref": "#/components/schemas/RestEntity"
269- | }
270- | }
271- | }
272- | }
273- | },
274263 | "operationId": "multiParamPost",
275264 | "parameters": [
276265 | {
@@ -348,23 +337,23 @@ class OpenApiGenerationTest extends FunSuite {
348337 | }
349338 | },
350339 | "required": true
351- | }
352- | }
353- | },
354- | "/prefix/{p0}/subget/{p1}": {
355- | "summary": "summary for prefix paths",
356- | "get": {
340+ | },
357341 | "responses": {
358342 | "200": {
359343 | "content": {
360344 | "application/json": {
361345 | "schema": {
362- | "type ": "string "
346+ | "$ref ": "#/components/schemas/RestEntity "
363347 | }
364348 | }
365349 | }
366350 | }
367- | },
351+ | }
352+ | }
353+ | },
354+ | "/prefix/{p0}/subget/{p1}": {
355+ | "summary": "summary for prefix paths",
356+ | "get": {
368357 | "operationId": "prefix_subget",
369358 | "parameters": [
370359 | {
@@ -419,15 +408,26 @@ class OpenApiGenerationTest extends FunSuite {
419408 | "format": "int32"
420409 | }
421410 | }
422- | ]
411+ | ],
412+ | "responses": {
413+ | "200": {
414+ | "content": {
415+ | "application/json": {
416+ | "schema": {
417+ | "type": "string"
418+ | }
419+ | }
420+ | }
421+ | }
422+ | }
423423 | }
424424 | },
425425 | "/trivialGet": {
426426 | "get": {
427+ | "operationId": "trivialGet",
427428 | "responses": {
428429 | "204": {}
429- | },
430- | "operationId": "trivialGet"
430+ | }
431431 | }
432432 | }
433433 | },
0 commit comments