title: How to write swagger API that accepts XML in request body
body: <p>We are using Swagger to write our REST API. We have a POST service which should accept an XML file in the request body.
  This is our request definition:</p>
  
  <pre><code>  /services/invoke:
      post:
        tags:
          - invoke
        summary: A request invocation
        operationId: invokeUsingPOST
        consumes:
          - application/xml
        produces:
          - application/xml
        parameters:
          - name: User-Token
            in: header
            description: The user token
            required: false
            type: string
          - in: body
            name: request
            description: invoke request XML
            required: false
            schema:
              type: string
        responses:
          '200':
            description: OK
            schema:
              type: string
          '400':
            description: Bad Operation
          '401':
            description: Unauthorized
          '404':
            description: Forbidden
  </code></pre>
  
  <p>However, when we generate a Java client code using swagger-codegen, the generated method looks like:</p>
  
  <pre><code>public String invokeUsingPOST (String userToken, Request request)
  </code></pre>
  
  <p>And the Request class is generated as:</p>
  
  <pre><code>@ApiModel(description = "")
  @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-11-25T18:45:31.524+02:00")
  public class Request   {
    @Override
    public String toString()  {
      StringBuilder sb = new StringBuilder();
      sb.append("class Request {\n");
      sb.append("}");
      return sb.toString();
    }
  }
  </code></pre>
  
  <p>How do I use it to send my XML? Do I have to derive from it and override the toString() method, or is there a better way to do it?</p>