Forum Discussion

pkoukios's avatar
New Member
3 years ago

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".

No RepliesBe the first to reply