cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload application/zip file through swagger UI (openAPI 3.0)?

pkoukios
New Member

How to upload application/zip file through swagger UI (openAPI 3.0)?

I am using spring boot REST API with swagger of OpenAPI 3.0. I am using the endpoint:

@PostMapping(consumes = "application/zip")
public ResponseEntity<String> createSth(HttpServletRequest request) {...}

I would like to be able to have the Select file button in the swagger UI in order to upload a zip file. Instead I see the Media type dropdown with two values: "*/*" and "application/zip". The Example Value below is "string" and the schema is also "string".

New Here?
Join us and watch the welcome video:
Top Kudoed Authors