-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
APIs allow for many different ways of uploading files. I'd like to be able to document the following in Swagger.
swagger: '2.0'
info:
title: File Put Sample
version: "1.0.0"
paths:
/attachments/{name}:
put:
summary: Upload
parameters:
- name: name
in: path
description: the name of an attachment
required: true
type: string
- name: content
in: body
description: the attachment content
required: true
schema:
type: file
consumes:
- application/octet-stream
responses:
200:
description: the upload was successful
This basically describes an API that can PUT file content onto a specific url. By setting consumes to other mime-typed then application/octet-stream (eg., image/png) it's also possible to express what content must be uploaded.
Metadata
Metadata
Assignees
Labels
No labels