Skip to content

Commit

Permalink
use correct CodecFormat, so that output swagger matches
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson committed Aug 6, 2024
1 parent fbff47a commit 8001cb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class EndpointGenerator {
case StreamingImplementation.Pekko => "sttp.capabilities.pekko.PekkoStreams"
case StreamingImplementation.Zio => "sttp.capabilities.zio.ZioStreams"
}
s"streamTextBody($capability)(CodecFormat.TextPlain())"
s"streamTextBody($capability)(CodecFormat.OctetStream())"
case x => bail(s"$contentType only supports binary schema. Found $x")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ object TapirGeneratedEndpoints {
endpoint
.get
.in(("binary" / "test"))
.out(streamTextBody(sttp.capabilities.pekko.PekkoStreams)(CodecFormat.TextPlain()).description("Response CSV body"))
.out(streamTextBody(sttp.capabilities.pekko.PekkoStreams)(CodecFormat.OctetStream()).description("Response CSV body"))

lazy val postBinaryTest =
endpoint
.post
.in(("binary" / "test"))
.in(streamTextBody(sttp.capabilities.pekko.PekkoStreams)(CodecFormat.TextPlain()))
.in(streamTextBody(sttp.capabilities.pekko.PekkoStreams)(CodecFormat.OctetStream()))
.out(jsonBody[String].description("successful operation"))

lazy val putAdtTest =
Expand Down

0 comments on commit 8001cb9

Please sign in to comment.