swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

How to pass array of string as parameters in swagger ui #128

Open amit---kumar opened 7 years ago

amit---kumar commented 7 years ago

Below is the REST api which i want to document using Swagger UI


  @ApiOperation(
              nickname = "alertForBundleId",
              value = "alertForBundleId",
              notes = "",
              httpMethod = "GET")
  def alertForBundleId(
                @ApiParam(name = "mfr", value = "Manufacturer", required = true) @PathParam("mfr") mfr: String,
                @ApiParam(name = "col", value = "Columns", required = true) @QueryParam("col") cols: List[String])){...}

Here cols parameter is accepting List of string.
When i pass two elements for the list separating by new line, then its generates url like

?col=sysid%2Calert_id

while it should be like

?col=sysid&col=alert_id

it works well for single element list
compatibility scala : 2.10.4, play:2.3.x, swagger:1.2, swagger-play: 1.3.12
Any help will be greatly appreciated.