title: Swagger ApiModelProperty for value class
body: <p>I'm trying to use the <a href="https://github.com/swagger-api/swagger-play/tree/master/play-2.5/swagger-play2" rel="nofollow noreferrer">Swagger Play2 Module</a> to generate api docs for a Play application. We use a lot of value classes for some additional type-safety and code readability. </p>
  
  <p>One of the actions generates JSON for a case class like the following:</p>
  
  <pre><code>case class MyResponse(prop1: MyValueType, prop2: MyValueType)
  </code></pre>
  
  <p>where <code>MyValueType</code> is such a value class:</p>
  
  <pre><code>case class MyValueType(value: String)
  </code></pre>
  
  <p>that is formatted to JSON just as a string using a custom <code>Format[T]</code>. </p>
  
  <p>Swagger UI generates example JSON code like this:</p>
  
  <pre><code>{
    "prop1": {
        "value": "string"
    },
    "prop2": {
        "value": "string"
    }
  }
  </code></pre>
  
  <p>while I would like it to generate this:</p>
  
  <pre><code>{
    "prop1": "string",
    "prop2": "string"
  } 
  </code></pre>
  
  <p>I have tried a custom annotation like this, but that doesn't seem to work:</p>
  
  <pre><code>case class MyResponse(
    @ApiModelProperty(dataType="string") prop1: MyValueType, 
    @ApiModelProperty(dataType="string") prop2: MyValueType, 
  )
  </code></pre>
  
  <p>Any tips on how to accomplish this?</p>