Skip to content

Commit

Permalink
add multipart support
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed May 24, 2019
1 parent 76060ee commit 4e3c5fd
Show file tree
Hide file tree
Showing 9 changed files with 324 additions and 36 deletions.
42 changes: 42 additions & 0 deletions openapi.yaml
Expand Up @@ -150,6 +150,38 @@ paths:
schema:
$ref: '#/components/schemas/Error'

/pets/{id}/photos:
post:
description: upload a photo of the pet
operationId: uploadPetPhoto
parameters:
- name: id
in: path
description: ID of pet to fetch
required: true
schema:
type: integer
format: int64
requestBody:
content:
multipart/form-data:
schema:
type: object
required:
- file
- metadata
properties:
file:
description: The photo
type: string
format: binary
metadata:
type: string
# $ref: '#/components/schemas/NewPhoto'
responses:
'200':
description: photo uploaded

/pets/{id}/attributes:
get:
description: Returns attributes for this pet
Expand Down Expand Up @@ -277,6 +309,16 @@ components:
type: integer
format: int64

NewPhoto:
type: object
required:
- file
properties:
file:
description: The photo
type: string
format: binary

Error:
required:
- code
Expand Down
156 changes: 127 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e3c5fd

Please sign in to comment.