diff --git a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala index 68bdb0e77..0333a758c 100644 --- a/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala +++ b/modules/http4s/src/smithy4s/http4s/internals/SmithyHttp4sServerEndpoint.scala @@ -141,9 +141,9 @@ private[http4s] class SmithyHttp4sServerEndpointImpl[F[_], Op[_, _, _, _, _], I, case None => // NB : only compiling the input codec if the data cannot be // totally extracted from the metadata. + implicit val inputCodec = + entityCompiler.compilePartialEntityDecoder(inputSchema, entityCache) (metadata, request) => - implicit val inputCodec = - entityCompiler.compilePartialEntityDecoder(inputSchema, entityCache) for { metadataPartial <- inputMetadataDecoder.decode(metadata).liftTo[F] bodyPartial <- request.as[BodyPartial[I]]