[BUG] [scala-akka-client] Scala Akka client does not support arbitrary query string values
Created by: ameenhaq
Description
When generating an api with an endpoint that takes an arbitrary set of query string parameters, which is to be represented as Map[String, Any]
in the client, the generated code tries to use a query parameter append method that does not support the Map[String, Any]
data type.
openapi-generator version
Latest
OpenAPI declaration file content or url
/api/v1/query:
get:
summary: Get a result using some filters
operationId: getQuery
parameters:
- name: filter
in: query
required: false
schema:
type: object
additionalProperties: true
Suggest a fix
Currently, it utilises a method withQueryParam
which cannot handle a Map
type.
def withQueryParam(name: String, value: Any): ApiRequest[U] = copy[U](queryParams = queryParams + (name -> value))
This can be supported by the inclusion of;
def withQueryParam(values: Map[String, Any]): ApiRequest[U] = copy[U](queryParams = queryParams ++ values)
A full solution has been raised as PR #8610.