Skip to content

Commit

Permalink
Add missing stubs for maxBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
kciesielski committed Nov 22, 2023
1 parent 1a30667 commit fbeb677
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}

0 comments on commit fbeb677

Please sign in to comment.