title: Trying to pass Json object to Jersey restfull service as FormDataParam
body: <p>I do not know how to pass Java object to Jersey restfull service as FormDataParam. The service works perfectly with curl, but Swagger responds with error. The problem is most probably with annotation @FormDataParam. Swagger does not throw 415 Error Unsupported Media File, but it </p>
  
  <p>Here is the code Jersey service:</p>
  
  <pre><code>@POST
      @ApiOperation(value = "Upload", notes = "", response = ImageAPIResponse.class)
      @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, "application/x-javascript" })
      @Consumes(MediaType.MULTIPART_FORM_DATA)
      @ApiResponses(value = {
              @ApiResponse(code = 200, message = "Successful or application error (see notes)", response = ImageAPIResponse.class) })
      public ImageAPIUploadUpdateResponse upload(
              @ApiParam(required = true, value = "user name part of credentials") @FormDataParam("user_name") String userName, //
              @ApiParam(required = true, value = "") @FormDataParam("file") File file, //
              @ApiParam(required = true, value = "") @FormDataParam("file") FormDataContentDisposition contentDispositionHeader,
              @ApiParam(required = false, value = "") @FormDataParam("file_name") String fileName,
              @ApiParam(required = false, value = "") @FormDataParam("meta_data") ImageMetaData metaData) {
          ImageAPIResponse imageAPIResponse = new ImageAPIResponse();
  
          //metaData object keeps being null...
  
          return imageAPIResponse;
      }
  
  
      public class ImageMetaData{
          public String fileName;
          public String fileType;
      }
  </code></pre>
  
  <p>Did anyone encounter a similar problem with FormDataParam? It would be great if I could use this Jersey annotation in my parameters.</p>