Example of an OpenAPI document with different content types for requests and responses.
Contact
Servers
https://api.example.com
JSON Content Type
XML Content Type
Form URL Encoded Content Type
Multipart Form Data Content Type
POST
/multipart
Example of a request with multipart form data content type for file uploads.
Request Body
multipart/form-data
object
file
string
Required
File to upload
Format
"binary"
description
string
category
string
Valid values
"avatar"
"document"
"other"
Responses
File uploaded successfully
application/json
object
file_id
string
file_name
string
file_size
integer
file_url
string
Format
"uri"