From fbeb677ca607634f653bf2e86800fb98d6dbb3d8 Mon Sep 17 00:00:00 2001 From: kciesielski Date: Wed, 22 Nov 2023 10:37:10 +0100 Subject: [PATCH] Add missing stubs for maxBytes --- .../zio/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala | 2 +- .../zio1/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala | 2 +- .../sttp/tapir/serverless/aws/lambda/AwsRequestBody.scala | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integrations/zio/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala b/integrations/zio/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala index 0ae7569154..77dc35f54e 100644 --- a/integrations/zio/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala +++ b/integrations/zio/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala @@ -29,7 +29,7 @@ object ZTapirTest extends ZIOSpecDefault with ZTapir { private val exampleRequestBody = new RequestBody[TestEffect, RequestBodyType] { override val streams: Streams[RequestBodyType] = null.asInstanceOf[Streams[RequestBodyType]] override def toRaw[R](serverRequest: ServerRequest, bodyType: RawBodyType[R]): TestEffect[RawValue[R]] = ??? - override def toStream(serverRequest: ServerRequest): streams.BinaryStream = ??? + override def toStream(serverRequest: ServerRequest, maxBytes: Option[Long]): streams.BinaryStream = ??? } private val exampleToResponse: ToResponseBody[ResponseBodyType, RequestBodyType] = new ToResponseBody[ResponseBodyType, RequestBodyType] { diff --git a/integrations/zio1/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala b/integrations/zio1/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala index 3e1617c785..fce0ad61ad 100644 --- a/integrations/zio1/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala +++ b/integrations/zio1/src/test/scala/sttp/tapir/ztapir/ZTapirTest.scala @@ -31,7 +31,7 @@ object ZTapirTest extends DefaultRunnableSpec with ZTapir { private val exampleRequestBody = new RequestBody[TestEffect, RequestBodyType] { override val streams: Streams[RequestBodyType] = null.asInstanceOf[Streams[RequestBodyType]] override def toRaw[R](serverRequest: ServerRequest, bodyType: RawBodyType[R]): TestEffect[RawValue[R]] = ??? - override def toStream(serverRequest: ServerRequest): streams.BinaryStream = ??? + override def toStream(serverRequest: ServerRequest, maxBytes: Option[Long]): streams.BinaryStream = ??? } private val exampleToResponse: ToResponseBody[ResponseBodyType, RequestBodyType] = new ToResponseBody[ResponseBodyType, RequestBodyType] { diff --git a/serverless/aws/lambda-core/src/main/scala/sttp/tapir/serverless/aws/lambda/AwsRequestBody.scala b/serverless/aws/lambda-core/src/main/scala/sttp/tapir/serverless/aws/lambda/AwsRequestBody.scala index c8675ed552..b498fa60ba 100644 --- a/serverless/aws/lambda-core/src/main/scala/sttp/tapir/serverless/aws/lambda/AwsRequestBody.scala +++ b/serverless/aws/lambda-core/src/main/scala/sttp/tapir/serverless/aws/lambda/AwsRequestBody.scala @@ -33,7 +33,8 @@ private[lambda] class AwsRequestBody[F[_]: MonadError]() extends RequestBody[F, }).asInstanceOf[RawValue[R]].unit } - override def toStream(serverRequest: ServerRequest): streams.BinaryStream = throw new UnsupportedOperationException + override def toStream(serverRequest: ServerRequest, maxBytes: Option[Long]): streams.BinaryStream = + throw new UnsupportedOperationException private def awsRequest(serverRequest: ServerRequest) = serverRequest.underlying.asInstanceOf[AwsRequest] }