I have the following case class
@ApiModel("StationResponse") case class StationResponse (id: Option[String],
@ApiModelProperty(dataType = "double", required = false)
longitude: Option[Double])
The longitude field is modelled as "Object" instead of "double"
I tried to override the dataType with @ApiModelProperty but no luck. Thanks for your comments.
I am using Swagger 1.3.12 with Scala 2.11.6
I solved the issue by adding @field annotation along with ApiModelProperty like below:
@ApiModel("StationResponse")
case class StationResponse (id: Option[String],
@(ApiModelProperty@field)(dataType = "double", required = false)
longitude: Option[Double])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With