diff --git a/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache b/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache index 5c009e7e706..ccb74ec2f4d 100644 --- a/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache +++ b/modules/swagger-codegen/src/main/resources/scala/apiInvoker.mustache @@ -53,6 +53,9 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper, def escape(value: String): String = { URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") } + def escape(values: List[String]): String = { + values.map(escape).mkString(",") + } def escape(value: Long): String = value.toString def escape(value: Double): String = value.toString diff --git a/samples/client/petstore-security-test/scala/src/main/scala/io/swagger/client/ApiInvoker.scala b/samples/client/petstore-security-test/scala/src/main/scala/io/swagger/client/ApiInvoker.scala index 65cccaea4b2..182c49fc99d 100644 --- a/samples/client/petstore-security-test/scala/src/main/scala/io/swagger/client/ApiInvoker.scala +++ b/samples/client/petstore-security-test/scala/src/main/scala/io/swagger/client/ApiInvoker.scala @@ -63,6 +63,9 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper, def escape(value: String): String = { URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") } + def escape(values: List[String]): String = { + values.map(escape).mkString(",") + } def escape(value: Long): String = value.toString diff --git a/samples/client/petstore/scala/src/main/scala/io/swagger/client/ApiInvoker.scala b/samples/client/petstore/scala/src/main/scala/io/swagger/client/ApiInvoker.scala index 25ca1fc85cc..75f0833d51f 100644 --- a/samples/client/petstore/scala/src/main/scala/io/swagger/client/ApiInvoker.scala +++ b/samples/client/petstore/scala/src/main/scala/io/swagger/client/ApiInvoker.scala @@ -64,6 +64,9 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper, def escape(value: String): String = { URLEncoder.encode(value, "utf-8").replaceAll("\\+", "%20") } + def escape(values: List[String]): String = { + values.map(escape).mkString(",") + } def escape(value: Long): String = value.toString def escape(value: Double): String = value.toString