Created
January 5, 2021 10:28
-
-
Save notizklotz/5b772d0fa35b71bce83562dd3ab07780 to your computer and use it in GitHub Desktop.
OpenAPI spec with multipart file upload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
info: | |
version: "1.0.0" | |
title: "Multipart file upload" | |
paths: | |
/files: | |
post: | |
summary: Upload files | |
operationId: uploadFiles | |
requestBody: | |
required: true | |
content: | |
multipart/form-data: | |
schema: | |
$ref: '#/components/schemas/ReceiptUpload' | |
responses: | |
201: | |
description: OK | |
components: | |
schemas: | |
ReceiptUpload: | |
type: object | |
properties: | |
nonfileProperty: | |
description: 'The PartnerNumber of the person this receipt references to' | |
type: string | |
file: | |
description: 'The documents to upload. Specify this parameter multiple times for multiple documents.' | |
type: array | |
items: | |
type: string | |
format: binary | |
required: | |
- nonfileProperty | |
- file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment