mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-04-20 22:49:09 +00:00
Update baseClient.mustache for scala-http4s (#21825)
The code for setting the form body parameters were wrong, e.g. the key value pair (id, 12345) would be encoded as id=%28id%2C12345%29 This commit adds a fix to the base client to correctly setting formBody values the previous pair will now be encoded as id=12345
This commit is contained in:
committed by
GitHub
parent
afedd3fd33
commit
bd0b81d26d
@@ -66,7 +66,7 @@ abstract class BaseClient[F[*]: Concurrent](
|
||||
request.putHeaders(Header.Raw(CIString(name), value))
|
||||
}
|
||||
val formBody = formParameters.map { x =>
|
||||
UrlForm(x.groupBy(_._1).map{case (k, v) => (k, v.mkString(","))}.toSeq*)
|
||||
UrlForm(x.groupBy(_._1).map { case (k, v) => (k, v.map(_._2).mkString(",")) }.toSeq*)
|
||||
}
|
||||
|
||||
import JsonSupports.*
|
||||
|
||||
@@ -75,7 +75,7 @@ abstract class BaseClient[F[*]: Concurrent](
|
||||
request.putHeaders(Header.Raw(CIString(name), value))
|
||||
}
|
||||
val formBody = formParameters.map { x =>
|
||||
UrlForm(x.groupBy(_._1).map{case (k, v) => (k, v.mkString(","))}.toSeq*)
|
||||
UrlForm(x.groupBy(_._1).map { case (k, v) => (k, v.map(_._2).mkString(",")) }.toSeq*)
|
||||
}
|
||||
|
||||
import JsonSupports.*
|
||||
|
||||
Reference in New Issue
Block a user