title: JHipster, spring rest service with MultiPart and JSON, swagger/curl error
body: <p>I am having problems with JHipster to publish a rest spring service.
  The service includes a MultipartFile, parameters and a JSON object. To my knowledge, I should be able to publish as follows:</p>
  
  <pre><code>public @ResponseBody
      ResponseEntity&lt;DocumentId&gt; addDoc(@RequestPart(required = true) MultipartFile file, @RequestPart(required = false) String folder, @RequestPart(required = true) MetadataDoc metadata)
  </code></pre>
  
  <p>The swagger api does not recognize the parameter "metadata" declaring it as "undefined"data type. And when I try to make a curl request, I get the following error:</p>
  
  <pre><code>2016-09-30 13:27:15.174  WARN 30451 --- [ XNIO-2 task-12] .m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported
  2016-09-30 13:27:15.298 DEBUG 30451 --- [ XNIO-2 task-14] c.q.smartgov.aop.logging.LoggingAspect   : Enter: com.queres.smartgov.web.rest.errors.ExceptionTranslator.processRuntimeException() with argument[s] = [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported]
  2016-09-30 13:27:15.298 DEBUG 30451 --- [ XNIO-2 task-14] c.q.smartgov.aop.logging.LoggingAspect   : Exit: com.queres.smartgov.web.rest.errors.ExceptionTranslator.processRuntimeException() with result = &lt;500 Internal Server Error,com.queres.smartgov.web.rest.errors.ErrorVM@3d872331,{}&gt;
  </code></pre>
  
  <p>The curl request:</p>
  
  <pre><code>curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImF1dGgiOiJST0xFX0FETUlOLFJPTEVfVVNFUiIsImV4cCI6MTQ3Njk3NjY3N30.82FRMRSrrniEQcIhI6DtHEFf5ln3OSjS_6OWy-1d8h3Cp5MjRuxo04IuIxAX_WC8YJJ1QyLrq7loLUSQ8RV_Gw' -F file=@"result.txt" -F folder=folde -F metadata={"clave":"2","valor":"1"}  'http://127.0.0.1:8080/sd_api/api/almacen/addDoc'
  </code></pre>
  
  <p>I have tried a lot of things, any suggestion?</p>
  
  <p>Thanks in advance!</p>