How do i POST attachment along with body parameter in swagger 2.0 ?
See original GitHub issueI am trying to include an excel file attachment along with body in swagger 2.0 and it is not working. I am not sure if swagger support this ? I would appreciate if someone could shed some light on this -
"parameters": [
{
"name": "file",
"in": "formData",
"type": "file",
"description": "upload file"
},
{
"name": "request",
"in": "body",
"type": "string",
"description": "Enter request",
"required": true,
"schema":
{
"$ref": "#/definitions/post"
}
}
],
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
File Upload - Swagger
The operation payload is defined using formData parameters (not body parameters). The file parameter must have type: file : paths: /upload: post: summary: ......
Read more >Swagger send body and formData parameter - Stack Overflow
I'm using Swagger 2.0 and I have a problem to send multiple post parameters. I have a swagger error Operation cannot have a...
Read more >Post body and formData parameter · Issue #889 · swagger-api ...
I'm using Swagger 2.0 and I have a problem to send multiple post parameters. I have a swagger error Operation cannot have a...
Read more >Designing REST API with Open API Specification (OAS) v2.0 ...
The file spec.json defined inside swagger-2.0 is defined ... Body Parameters: This kind of parameter is expected as part of request body, ...
Read more >Adding a File Upload Field to Your Swagger UI ... - Alex Dunn
However, this only handles the most common cases of required requests with query string parameters and HTTP Body content. In this post ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
3.0 was already released, and it’s included there, yes.
sounds good