Created
October 7, 2021 22:49
-
-
Save mathis-m/d9e6564090d0259c1363df233f5c6b91 to your computer and use it in GitHub Desktop.
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.0 | |
| info: | |
| title: Test API | |
| version: '1.0' | |
| servers: | |
| - url: 'http://localhost:3000' | |
| paths: | |
| # Generated CURL request uses: | |
| # -d '{}' | |
| # (This doesn't work; it could use something like --data-binary '@<file name>' instead.) | |
| /upload1: | |
| post: | |
| summary: Simple upload | |
| requestBody: | |
| required: true | |
| content: | |
| application/octet-stream: | |
| schema: | |
| type: string | |
| format: binary | |
| responses: | |
| '200': | |
| description: OK | |
| # Generated CURL request uses: | |
| # -F 'fileName=@<file name>;type=<mime type>' | |
| # (This works fine.) | |
| /upload2: | |
| post: | |
| summary: Multipart upload | |
| requestBody: | |
| required: true | |
| content: | |
| multipart/form-data: | |
| schema: | |
| type: object | |
| properties: | |
| fileName: | |
| type: string | |
| format: binary | |
| responses: | |
| '200': | |
| description: OK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment