How to pass array of string as parameters in swagger ui

Below is the REST api I want to document using the 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 the cols parameter takes a List of string.
When I pass two elements to separate the list on a new line, then url generates it like?
col = sysid% 2Calert_id

while it should be similar

? col = sysid & col = alert_id

this works well for a list of single items
Any help would be greatly appreciated.

+4
source share

Source: https://habr.com/ru/post/1667649/


All Articles