Skip to content

Commit

Permalink
Add request body content definitions to simple spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manfred committed May 8, 2024
1 parent 2128fec commit 919d830
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions test/files/openapi/simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ paths:
schema:
type: string
responses:
'200':
"200":
description: An array of books.
content:
application/json:
Expand All @@ -49,8 +49,14 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Book"
multipart/form-data:
schema:
$ref: "#/components/schemas/BookFormData"
text/plain:
schema:
type: string
responses:
'200':
"200":
description: A book.
content:
application/json:
Expand All @@ -77,7 +83,7 @@ paths:
schema:
type: integer
responses:
'200':
"200":
description: A book.
content:
application/json:
Expand All @@ -103,7 +109,7 @@ paths:
schema:
type: integer
responses:
'200':
"200":
description: A book.
content:
application/json:
Expand Down Expand Up @@ -132,7 +138,7 @@ paths:
schema:
type: integer
responses:
'204':
"204":
description: Book was deleted.
default:
description: Book was deleted.
Expand All @@ -144,7 +150,7 @@ paths:
tags:
- books
responses:
'200':
"200":
description: A book.
content:
application/json:
Expand All @@ -171,7 +177,7 @@ paths:
schema:
type: string
responses:
'200':
"200":
description: An array of books.
content:
application/json:
Expand All @@ -198,6 +204,22 @@ components:
type: string
tag:
type: string
BookFormData:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
image:
type: string
format: binary
Books:
type: array
items:
Expand All @@ -212,4 +234,4 @@ components:
type: integer
format: int32
message:
type: string
type: string

0 comments on commit 919d830

Please sign in to comment.