Skip to content

Commit 919d830

Browse files
committed
Add request body content definitions to simple spec.
1 parent 2128fec commit 919d830

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

test/files/openapi/simple.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ paths:
2626
schema:
2727
type: string
2828
responses:
29-
'200':
29+
"200":
3030
description: An array of books.
3131
content:
3232
application/json:
@@ -49,8 +49,14 @@ paths:
4949
application/json:
5050
schema:
5151
$ref: "#/components/schemas/Book"
52+
multipart/form-data:
53+
schema:
54+
$ref: "#/components/schemas/BookFormData"
55+
text/plain:
56+
schema:
57+
type: string
5258
responses:
53-
'200':
59+
"200":
5460
description: A book.
5561
content:
5662
application/json:
@@ -77,7 +83,7 @@ paths:
7783
schema:
7884
type: integer
7985
responses:
80-
'200':
86+
"200":
8187
description: A book.
8288
content:
8389
application/json:
@@ -103,7 +109,7 @@ paths:
103109
schema:
104110
type: integer
105111
responses:
106-
'200':
112+
"200":
107113
description: A book.
108114
content:
109115
application/json:
@@ -132,7 +138,7 @@ paths:
132138
schema:
133139
type: integer
134140
responses:
135-
'204':
141+
"204":
136142
description: Book was deleted.
137143
default:
138144
description: Book was deleted.
@@ -144,7 +150,7 @@ paths:
144150
tags:
145151
- books
146152
responses:
147-
'200':
153+
"200":
148154
description: A book.
149155
content:
150156
application/json:
@@ -171,7 +177,7 @@ paths:
171177
schema:
172178
type: string
173179
responses:
174-
'200':
180+
"200":
175181
description: An array of books.
176182
content:
177183
application/json:
@@ -198,6 +204,22 @@ components:
198204
type: string
199205
tag:
200206
type: string
207+
BookFormData:
208+
type: object
209+
required:
210+
- id
211+
- name
212+
properties:
213+
id:
214+
type: integer
215+
format: int64
216+
name:
217+
type: string
218+
tag:
219+
type: string
220+
image:
221+
type: string
222+
format: binary
201223
Books:
202224
type: array
203225
items:
@@ -212,4 +234,4 @@ components:
212234
type: integer
213235
format: int32
214236
message:
215-
type: string
237+
type: string

0 commit comments

Comments
 (0)