diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/apiRequest.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/apiRequest.mustache index fd2ba29ea0bd..10be69afa959 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/apiRequest.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/apiRequest.mustache @@ -49,6 +49,8 @@ case class ApiRequest[U]( def withPathParam(name: String, value: Any): ApiRequest[U] = copy[U](pathParams = pathParams + (name -> value)) + def withQueryParam(values: Map[String, Any]): ApiRequest[U] = copy[U](queryParams = queryParams ++ values) + def withQueryParam(name: String, value: Any): ApiRequest[U] = copy[U](queryParams = queryParams + (name -> value)) def withHeaderParam(name: String, value: Any): ApiRequest[U] = copy[U](headerParams = headerParams + (name -> value)) diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/paramCreation.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/paramCreation.mustache index 68280bd9a36b..dc7bbc9f434e 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/paramCreation.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/paramCreation.mustache @@ -1 +1 @@ -"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}} \ No newline at end of file +{{#isMap}}{{baseName}}{{/isMap}}{{^isMap}}"{{baseName}}", {{#isContainer}}ArrayValues({{{paramName}}}{{#collectionFormat}}, {{collectionFormat.toUpperCase}}{{/collectionFormat}}){{/isContainer}}{{^isContainer}}{{{paramName}}}{{/isContainer}}{{/isMap}} \ No newline at end of file diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiRequest.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiRequest.scala index 3dfa61094de0..d6f5ae6182e3 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiRequest.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiRequest.scala @@ -59,6 +59,8 @@ case class ApiRequest[U]( def withPathParam(name: String, value: Any): ApiRequest[U] = copy[U](pathParams = pathParams + (name -> value)) + def withQueryParam(values: Map[String, Any]): ApiRequest[U] = copy[U](queryParams = queryParams ++ values) + def withQueryParam(name: String, value: Any): ApiRequest[U] = copy[U](queryParams = queryParams + (name -> value)) def withHeaderParam(name: String, value: Any): ApiRequest[U] = copy[U](headerParams = headerParams + (name -> value)) diff --git a/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala b/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala index 48c8d4c644fd..15bec1fea3ba 100644 --- a/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala +++ b/samples/client/petstore/scala-akka/src/test/scala/PetApiTest.scala @@ -87,7 +87,6 @@ class PetApiTest extends AsyncFlatSpec with Matchers { it should "find pets by status" in { val request = api.findPetsByStatus(List("available")) - invoker .execute(request) .map { apiResponse =>