I have an API for uploading multiple files with below signature - takes in a list of multipart files and a request object.
@ApiOperation(consumes=MediaType.MULTIPART_FORM_DATA_VALUE)
@PostMapping("/upload")
public void uploadMultipleFiles(@RequestParam("req") RequestDTO request, @RequestParam("files") List<MultipartFile> files) {}
When I test this API using Postman it works but I when try using swagger, I noticed the content-type is passed as application/json and the API gives an error 'Current request is not multpart'. I tried adding consumes to @ApiOperation but the content-type is still application/json.