diff --git a/core/src/main/scala/sttp/tapir/generic/internal/FormCodecDerivation.scala b/core/src/main/scala/sttp/tapir/generic/internal/FormCodecDerivation.scala index 608c006cdf..c0f89f3d2c 100644 --- a/core/src/main/scala/sttp/tapir/generic/internal/FormCodecDerivation.scala +++ b/core/src/main/scala/sttp/tapir/generic/internal/FormCodecDerivation.scala @@ -45,7 +45,7 @@ object FormCodecMacros { val codecTree = q""" { def decode(params: Seq[(String, String)]): sttp.tapir.DecodeResult[$t] = { - val paramsMap: Map[String, Seq[String]] = params.groupBy(_._1).mapValues(_.map(_._2)).toMap + val paramsMap: Map[String, Seq[String]] = params.groupBy(_._1).transform((_, v) => v.map(_._2)) val decodeResults = List(..$decodeParams) sttp.tapir.DecodeResult.sequence(decodeResults).map { values => ${util.instanceFromValues}