Skip to content

Instantly share code, notes, and snippets.

@ponelat
Created June 7, 2018 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ponelat/eed475786cabcad61e861509c926967d to your computer and use it in GitHub Desktop.
Save ponelat/eed475786cabcad61e861509c926967d to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
version: '1'
title: 'Test of Multipart Form submission'
description: 'When using multipart form as the content type, the example rendered is a JSON object'
servers:
- url: http://httpbin.org
paths:
/anything:
post:
summary: Create an item
requestBody:
content:
multipart/form-data:
schema:
# type: object # <-- makes it work
properties: # Request parts should NOT be rendered as JSON
image:
type: string
format: binary
encoding:
image:
contentType: image/png, image/jpeg
description: The item to create.
required: true
responses:
'201':
description: Operation completed successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment