diff --git a/README.md b/README.md index 9f87cb2c86..759d08b52d 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ val booksListingRequest: Request[DecodeResult[Either[String, List[Book]]], Any] Add the following dependency: ```sbt -"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.3" ``` Then, import: diff --git a/build.sbt b/build.sbt index dea4ae6d0f..74f37c37db 100644 --- a/build.sbt +++ b/build.sbt @@ -1021,7 +1021,7 @@ lazy val pekkoGrpcExamples: ProjectMatrix = (projectMatrix in file("grpc/pekko-e .settings( name := "tapir-pekko-grpc-examples", libraryDependencies ++= Seq( - "org.apache.pekko" %% "pekko-discovery" % "1.1.0", + "org.apache.pekko" %% "pekko-discovery" % "1.1.1", slf4j ), fork := true diff --git a/examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala index 14f5b833e8..987f76cc9f 100644 --- a/examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala @@ -1,7 +1,7 @@ -// {cat=Hello, World!; effects=Future; server=http4s}: Exposing an endpoint using the http4s server +// {cat=Hello, World!; effects=cats-effect; server=http4s}: Exposing an endpoint using the http4s server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 //> using dep org.http4s::http4s-blaze-server:0.23.16 diff --git a/examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala b/examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala index e775c0165a..54f083dc6f 100644 --- a/examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=cats-effect; server=Netty}: Exposing an endpoint using the Netty server (cats-effect variant) -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/HelloWorldZioHttpServer.scala b/examples/src/main/scala/sttp/tapir/examples/HelloWorldZioHttpServer.scala index 52f1d4183e..fdf939bc5a 100644 --- a/examples/src/main/scala/sttp/tapir/examples/HelloWorldZioHttpServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/HelloWorldZioHttpServer.scala @@ -1,8 +1,8 @@ // {cat=Hello, World!; effects=ZIO; server=ZIO HTTP; json=ZIO JSON}: Exposing an endpoint using the ZIO HTTP server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-zio:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-zio:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/ZioEnvExampleHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/ZioEnvExampleHttp4sServer.scala index d7445c32cf..2c4eb1f6d0 100644 --- a/examples/src/main/scala/sttp/tapir/examples/ZioEnvExampleHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/ZioEnvExampleHttp4sServer.scala @@ -1,11 +1,11 @@ // {cat=Hello, World!; effects=ZIO; server=http4s; json=circe; docs=Swagger UI}: Exposing an endpoint, defined with ZIO and depending on services in the environment, using the http4s server //> using option -Ykind-projector -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep dev.zio::zio-interop-cats:23.1.0.3 diff --git a/examples/src/main/scala/sttp/tapir/examples/ZioExampleHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/ZioExampleHttp4sServer.scala index 2025c6e6c5..c6a29c8269 100644 --- a/examples/src/main/scala/sttp/tapir/examples/ZioExampleHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/ZioExampleHttp4sServer.scala @@ -1,10 +1,10 @@ // {cat=Hello, World!; effects=ZIO; server=http4s; json=circe; docs=Swagger UI}: Exposing an endpoint using the http4s server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep dev.zio::zio-interop-cats:23.1.0.3 diff --git a/examples/src/main/scala/sttp/tapir/examples/ZioExampleZioHttpServer.scala b/examples/src/main/scala/sttp/tapir/examples/ZioExampleZioHttpServer.scala index 3cd5ad6f37..24351f5fb0 100644 --- a/examples/src/main/scala/sttp/tapir/examples/ZioExampleZioHttpServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/ZioExampleZioHttpServer.scala @@ -1,11 +1,11 @@ // {cat=Hello, World!; effects=ZIO; server=zio-http; json=circe; docs=Swagger UI}: Exposing an endpoint using the ZIO HTTP server //> using option -Ykind-projector -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.3 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/ZioPartialServerLogicHttp4s.scala b/examples/src/main/scala/sttp/tapir/examples/ZioPartialServerLogicHttp4s.scala index 9b835f2251..e914540283 100644 --- a/examples/src/main/scala/sttp/tapir/examples/ZioPartialServerLogicHttp4s.scala +++ b/examples/src/main/scala/sttp/tapir/examples/ZioPartialServerLogicHttp4s.scala @@ -1,9 +1,9 @@ // {cat=Hello, World!; effects=ZIO; server=http4s}: Extending a base endpoint (which has the security logic provided), with server logic //> using option -Ykind-projector -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server-zio:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep com.softwaremill.sttp.client3::async-http-client-backend-zio:3.9.8 diff --git a/examples/src/main/scala/sttp/tapir/examples/booksExample.scala b/examples/src/main/scala/sttp/tapir/examples/booksExample.scala index 0ddab60af0..97951197d7 100644 --- a/examples/src/main/scala/sttp/tapir/examples/booksExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/booksExample.scala @@ -1,10 +1,10 @@ // {cat=Hello, World!; effects=Future; server=Pekko HTTP; client=sttp3; JSON=circe; docs=Swagger UI}: A demo of Tapir's capabilities -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 diff --git a/examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala b/examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala index b0b9f480f9..65fe4a4a9c 100644 --- a/examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala @@ -1,10 +1,10 @@ // {cat=Hello, World!; effects=Future; server=Netty; client=sttp3; JSON=Pickler; docs=Swagger UI}: A demo of Tapir's capabilities -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-pickler:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-pickler:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 diff --git a/examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala b/examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala index 74f3b3f6f8..95e7b4af72 100644 --- a/examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala @@ -1,8 +1,8 @@ // {cat=Client interpreter; effects=cats-effect; JSON=circe}: Interpreting an endpoint as an http4s client -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-client:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-client:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep org.http4s::http4s-circe:0.23.27 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep org.http4s::http4s-dsl:0.23.27 diff --git a/examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala b/examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala index 0ea9865a6f..9454ecbbbd 100644 --- a/examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala +++ b/examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala @@ -1,7 +1,7 @@ // {cat=Custom types; json=circe}: Supporting custom types, when used in query or path parameters, as well as part of JSON bodies -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 package sttp.tapir.examples.custom_types diff --git a/examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala b/examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala index bac959c1da..59cd90d2c8 100644 --- a/examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala +++ b/examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala @@ -1,10 +1,10 @@ // {cat=Custom types; effects=Future; server=Pekko HTTP; client=sttp3; JSON=circe; docs=Swagger UI}: A demo of Tapir's capabilities using semi-auto derivation -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-sttp-client:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 diff --git a/examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala b/examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala index 47fd2e5bda..c59a6c0f8d 100644 --- a/examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala +++ b/examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala @@ -1,8 +1,8 @@ // {cat=Custom types; effects=Direct; server=Netty; docs=Swagger UI}: Handling comma-separated query parameters -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 package sttp.tapir.examples.custom_types diff --git a/examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala b/examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala index 259242c7a1..1328469fd5 100644 --- a/examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala +++ b/examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala @@ -1,9 +1,9 @@ // {cat=Custom types; effects=Direct; server=Netty; JSON=circe; docs=Swagger UI}: Mapping a sealed trait hierarchy to JSON using a discriminator -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 package sttp.tapir.examples.custom_types diff --git a/examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala index aee52c393b..258e707b08 100644 --- a/examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala @@ -1,8 +1,8 @@ // {cat=Error handling; effects=cats-effect; server=http4s; JSON=circe}: Extending a base secured endpoint with error variants, using union types -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep com.softwaremill.sttp.client3::core:3.9.7 diff --git a/examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala b/examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala index 7815931328..12100e4885 100644 --- a/examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala @@ -1,9 +1,9 @@ // {cat=Error handling; effects=cats-effect; server=Netty; JSON=circe}: Error reporting provided by Iron type refinements -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-iron:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-iron:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.errors diff --git a/examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala index 1adb1199ea..4f73d42f69 100644 --- a/examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Error handling; effects=Future; server=Pekko HTTP}: Customising errors that are reported on decode failures (e.g. invalid or missing query parameter) -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 diff --git a/examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala index 76747e8e6e..a7767b2e62 100644 --- a/examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala @@ -1,8 +1,8 @@ // {cat=Error handling; effects=Future; server=Pekko HTTP; json=circe}: Error and successful outputs -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 diff --git a/examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala b/examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala index 8b82740d9d..26ee047fe9 100644 --- a/examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=Future; server=Armeria}: Exposing an endpoint using the Armeria server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-armeria-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-armeria-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/helloWorldJdkHttpServer.scala b/examples/src/main/scala/sttp/tapir/examples/helloWorldJdkHttpServer.scala index 44755956be..09fdf721a2 100644 --- a/examples/src/main/scala/sttp/tapir/examples/helloWorldJdkHttpServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/helloWorldJdkHttpServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=Direct; server=JDK Http}: Exposing an endpoint using the built-in JDK HTTP server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-jdkhttp-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-jdkhttp-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala b/examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala index b008d35caf..fd571d21c3 100644 --- a/examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=Future; server=Netty}: Exposing an endpoint using the Netty server (Future variant) -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala b/examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala index f6e0278c04..22c7266faf 100644 --- a/examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=Direct; server=Netty}: Exposing an endpoint using the Netty server (Direct-style variant) -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala index d9e5fcdead..4f58e5d0ee 100644 --- a/examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Hello, World!; effects=Future; server=Pekko HTTP}: Exposing an endpoint using the Pekko HTTP server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples diff --git a/examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala b/examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala index f7a75d0590..29f82dec44 100644 --- a/examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala @@ -1,7 +1,7 @@ // {cat=Logging; effects=ZIO; server=Netty}: Logging using a correlation id -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-zio:1.11.3 //> using dep com.softwaremill.sttp.client3::zio:3.9.7 package sttp.tapir.examples.logging diff --git a/examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala index 477590c8a5..9a0ba325e0 100644 --- a/examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Multipart; effects=Future; server=Pekko HTTP}: Uploading a multipart form, with text and file parts -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep org.apache.pekko::pekko-http:1.0.1 //> using dep org.apache.pekko::pekko-stream:1.0.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 diff --git a/examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala b/examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala index bc800eeca9..1f4359aeec 100644 --- a/examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala @@ -1,8 +1,8 @@ // {cat=Observability; effects=ZIO; server=ZIO HTTP}: Reporting Prometheus metrics -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-metrics:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-metrics:1.11.3 package sttp.tapir.examples.observability diff --git a/examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala b/examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala index e8f1d4dd57..f834e126f6 100644 --- a/examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala @@ -1,9 +1,9 @@ // {cat=Observability; effects=Future; server=Netty; json=circe}: Reporting DataDog metrics -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-datadog-metrics:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-datadog-metrics:1.11.3 //> using dep org.slf4j:slf4j-api:2.0.13 package sttp.tapir.examples.observability diff --git a/examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala b/examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala index e7ca6b6b20..f1cffee6ad 100644 --- a/examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala @@ -1,10 +1,10 @@ // {cat=Observability; effects=Future; server=Netty; json=circe}: Reporting OpenTelemetry metrics -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-opentelemetry-metrics:1.11.2 -//> using dep io.opentelemetry:opentelemetry-exporter-otlp:1.42.0 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-opentelemetry-metrics:1.11.3 +//> using dep io.opentelemetry:opentelemetry-exporter-otlp:1.42.1 //> using dep org.slf4j:slf4j-api:2.0.13 package sttp.tapir.examples.observability diff --git a/examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala b/examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala index dc0c91d97b..3dbb4cc5a0 100644 --- a/examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala @@ -1,9 +1,9 @@ // {cat=Observability; effects=Future; server=Netty; json=circe}: Reporting Prometheus metrics -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-prometheus-metrics:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-prometheus-metrics:1.11.3 //> using dep org.slf4j:slf4j-api:2.0.13 package sttp.tapir.examples.observability diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala index a99807f84d..9d0850eda3 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala @@ -1,9 +1,9 @@ // {cat=OpenAPI documentation; effects=cats-effect; server=http4s; docs=Swagger UI; json=circe}: Documenting multiple endpoints -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala index d03bc52cac..0107543ce2 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala @@ -1,8 +1,8 @@ // {cat=OpenAPI documentation; effects=cats-effect; server=http4s; docs=ReDoc}: Exposing documentation using ReDoc -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-redoc-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-redoc-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala index 16ed883f1a..1647330037 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala @@ -1,9 +1,9 @@ // {cat=OpenAPI documentation; effects=ZIO; server=ZIO HTTP; json=circe; docs=ReDoc}: Exposing documentation using ReDoc -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-redoc-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-redoc-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala index 6981fb82a2..fec3794e5b 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala @@ -1,9 +1,9 @@ // {cat=OpenAPI documentation; effects=Future; server=Pekko HTTP; docs=Swagger UI; json=circe}: Documenting multiple endpoints -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala index 1307e15b7a..07afb16ac3 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala @@ -1,8 +1,8 @@ // {cat=OpenAPI documentation; json=circe}: Adding OpenAPI documentation extensions -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-openapi-docs:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-openapi-docs:1.11.3 //> using dep com.softwaremill.sttp.apispec::openapi-circe-yaml:0.10.0 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala index 3840b3aa00..763e2efcf9 100644 --- a/examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala @@ -1,8 +1,8 @@ // {cat=OpenAPI documentation; effects=Future; server=Pekko HTTP; docs=Swagger UI}: Securing Swagger UI using OAuth 2 -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 package sttp.tapir.examples.openapi diff --git a/examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala b/examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala index f5c2054a67..2c8ff26365 100644 --- a/examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala +++ b/examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala @@ -1,9 +1,9 @@ // {cat=Schemas; effects=Future; server=Netty; json=circe; docs=Swagger UI}: Customising a derived schema, using annotations, and using implicits -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 package sttp.tapir.examples.schema diff --git a/examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala index ff42cf99de..cc546a8a6f 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala @@ -1,8 +1,8 @@ // {cat=Security; effects=cats-effect; server=http4s; json=circe}: Login using OAuth2, authorization code flow -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep com.softwaremill.sttp.client3::async-http-client-backend-cats:3.9.8 //> using dep org.http4s::http4s-blaze-server:0.23.16 //> using dep com.github.jwt-scala::jwt-circe:10.0.1 diff --git a/examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala b/examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala index a428348d42..a90b101cad 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=ZIO; server=ZIO HTTP}: Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::async-http-client-backend-zio:3.9.8 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala index 78e30eb3e1..49963c113a 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=Future; server=Pekko HTTP}: HTTP basic authentication -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala index f349b77add..3f46d728b2 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=Future; server=Pekko HTTP}: CORS interceptor -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala b/examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala index c061276156..9408640d50 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=Future; server=Netty}: Interceptor verifying externally added security credentials -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala b/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala index 97e429e39a..d21f84da06 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=Future; server=Pekko HTTP}: Separating security and server logic, with a reusable base endpoint -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala b/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala index 193de75475..64301daeff 100644 --- a/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala +++ b/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala @@ -1,7 +1,7 @@ // {cat=Security; effects=Future; server=Pekko HTTP}: Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.security diff --git a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala index a2259c972a..3751336254 100644 --- a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala @@ -1,8 +1,8 @@ // {cat=Static content; effects=Direct; server=Netty}: Serving static files from a directory -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 package sttp.tapir.examples.static_content diff --git a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala index 1389af14ca..0b8cdef467 100644 --- a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala @@ -1,8 +1,8 @@ // {cat=Static content; effects=Future; server=Pekko HTTP}: Serving static files from a directory, with range requests -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.static_content diff --git a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala index aa31df5205..e91cbd9933 100644 --- a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala @@ -1,8 +1,8 @@ // {cat=Static content; effects=Future; server=Pekko HTTP}: Serving static files from resources -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 package sttp.tapir.examples.static_content diff --git a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala index 93127e2b3f..4e271aaae4 100644 --- a/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala @@ -1,8 +1,8 @@ // {cat=Static content; effects=Future; server=Pekko HTTP}: Serving static files secured with a bearer token -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-files:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.static_content diff --git a/examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala b/examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala index 9d83fb6d1e..8741350fd1 100644 --- a/examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala @@ -1,7 +1,7 @@ // {cat=Status code; effects=Direct; server=Netty}: Serving static files from a directory -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 package sttp.tapir.examples.status_code diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala index c160d0535f..92b0cea462 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=cats-effect; server=http4s}: Proxy requests, handling bodies as fs2 streams -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep com.softwaremill.sttp.client3::fs2:3.9.7 //> using dep org.http4s::http4s-blaze-server:0.23.16 diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala index 89b4aeb7ed..d92555b9fd 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=cats-effect; server=http4s}: Stream response as an fs2 stream -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 //> using dep org.http4s::http4s-blaze-server:0.23.16 diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala index 5b0a18402c..81751073a6 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=cats-effect; server=http4s}: Respond with an fs2 stream, or with an error, represented as a failed effect in the business logic -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 package sttp.tapir.examples.streaming diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala index a9f60dcf05..52fb4079c8 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=cats-effect; server=Netty}: Stream response as an fs2 stream -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-cats:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.streaming diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala index f0cd617e35..83c2f6bab7 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=ZIO; server=Netty}: Stream response as a ZIO stream -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-zio:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-zio:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.streaming diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala index 9376ad4378..774e9abec2 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=ZIO; server=ZIO HTTP}: Stream response as a ZIO stream -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-zio-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.streaming diff --git a/examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala index 3efc25d415..b5c4b1cff7 100644 --- a/examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala @@ -1,7 +1,7 @@ // {cat=Streaming; effects=Future; server=Pekko HTTP}: Stream response as a Pekko stream -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 package sttp.tapir.examples.streaming diff --git a/examples/src/main/scala/sttp/tapir/examples/testing/CatsServerStubInterpreter.scala b/examples/src/main/scala/sttp/tapir/examples/testing/CatsServerStubInterpreter.scala new file mode 100644 index 0000000000..66676f0ac3 --- /dev/null +++ b/examples/src/main/scala/sttp/tapir/examples/testing/CatsServerStubInterpreter.scala @@ -0,0 +1,55 @@ +// {cat=Testing; effects=cats-effect}: Test endpoints using the TapirStubInterpreter + +//> using dep com.softwaremill.sttp.tapir::tapir-cats-effect:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-sttp-stub-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-cats:1.11.3 +//> using dep com.softwaremill.sttp.client3::core:3.9.7 +//> using dep org.scalatest::scalatest:3.2.19 + +package sttp.tapir.examples.testing + +import cats.effect.IO +import org.scalatest.flatspec.AsyncFlatSpec +import org.scalatest.matchers.should.Matchers +import sttp.client3.* +import sttp.client3.testing.SttpBackendStub +import sttp.tapir.* +import sttp.tapir.integ.cats.effect.CatsMonadError +import sttp.tapir.server.ServerEndpoint +import sttp.tapir.server.stub.TapirStubInterpreter + +import scala.concurrent.Future + +class CatsServerStubInterpreter extends AsyncFlatSpec with Matchers: + it should "run greet users logic" in { + // given + // We need to pass an SttpBackendStub which is configured for the IO effect. One way to do it is to pass a + // MonadError implementation, as here. Alternatively, you can use any sttp-client cats-effect backend, and obtain + // the stub using its .stub method. For example: AsyncHttpClientCatsBackend.stub[IO] + val stubBackend: SttpBackend[IO, Any] = TapirStubInterpreter(SttpBackendStub[IO, Any](CatsMonadError())) + .whenServerEndpoint(UsersApi.greetUser) + .thenRunLogic() + .backend() + + // when + val response = sttp.client3.basicRequest + .get(uri"http://test.com/api/users/greet") + .header("Authorization", "Bearer password") + .send(stubBackend) + + // then + // since we are using ScalaTest, we need to run the IO effect, here - synchronously. When using an IO-aware test + // framework, this might get simplified. + import cats.effect.unsafe.implicits.global + response.unsafeRunSync().body shouldBe Right("hello user123") + } + + // The API under test + object UsersApi: + val greetUser: ServerEndpoint[Any, IO] = endpoint.get + .in("api" / "users" / "greet") + .securityIn(auth.bearer[String]()) + .out(stringBody) + .errorOut(stringBody) + .serverSecurityLogic(token => IO(if token == "password" then Right("user123") else Left("unauthorized"))) + .serverLogic(user => _ => IO(Right(s"hello $user"))) diff --git a/examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreterExample.scala b/examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreter.scala similarity index 94% rename from examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreterExample.scala rename to examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreter.scala index 70c8e6db49..5815d4fdb0 100644 --- a/examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreterExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreter.scala @@ -1,8 +1,8 @@ // {cat=Testing; effects=Future; server=Pekko HTTP}: Test endpoints using the TapirStubInterpreter -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-sttp-stub-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-sttp-stub-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 //> using dep org.scalatest::scalatest:3.2.19 @@ -23,7 +23,7 @@ import sttp.tapir.server.stub.TapirStubInterpreter import scala.concurrent.{ExecutionContext, Future} -class PekkoServerStubInterpreterExample extends AsyncFlatSpec with Matchers: +class PekkoServerStubInterpreter extends AsyncFlatSpec with Matchers: it should "use custom exception handler" in { val stubBackend: SttpBackend[Future, Any] = TapirStubInterpreter(PekkoUsersApi.options, SttpBackendStub.asynchronousFuture) diff --git a/examples/src/main/scala/sttp/tapir/examples/testing/SttpMockServerClientExample.scala b/examples/src/main/scala/sttp/tapir/examples/testing/SttpMockServerClientExample.scala index 86e554f261..ca56977d2a 100644 --- a/examples/src/main/scala/sttp/tapir/examples/testing/SttpMockServerClientExample.scala +++ b/examples/src/main/scala/sttp/tapir/examples/testing/SttpMockServerClientExample.scala @@ -1,8 +1,8 @@ // {cat=Testing; json=circe}: Test endpoints using the MockServer client -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 -//> using dep com.softwaremill.sttp.tapir::sttp-mock-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 +//> using dep com.softwaremill.sttp.tapir::sttp-mock-server:1.11.3 //> using dep com.softwaremill.sttp.client3::core:3.9.7 //> using dep org.mock-server:mockserver-netty:5.15.0 //> using dep org.scalatest::scalatest:3.2.19 diff --git a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketChatNettySyncServer.scala b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketChatNettySyncServer.scala index 913021afc2..1ab38b9b89 100644 --- a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketChatNettySyncServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketChatNettySyncServer.scala @@ -1,7 +1,7 @@ // {cat=WebSocket; effects=Direct; server=Netty}: A WebSocket chat across multiple clients connected to the same server -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 //> using dep com.softwaremill.ox::core:0.3.7 package sttp.tapir.examples.websocket diff --git a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketHttp4sServer.scala b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketHttp4sServer.scala index a1f594fd5c..74f28c92c9 100644 --- a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketHttp4sServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketHttp4sServer.scala @@ -1,9 +1,9 @@ // {cat=WebSocket; effects=cats-effect; server=http4s; json=circe; docs=AsyncAPI}: Describe and implement a WebSocket endpoint -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-asyncapi-docs:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-asyncapi-docs:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep com.softwaremill.sttp.apispec::asyncapi-circe-yaml:0.10.0 //> using dep com.softwaremill.sttp.client3::async-http-client-backend-fs2:3.9.8 //> using dep org.http4s::http4s-blaze-server:0.23.16 diff --git a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala index 71f033a1d2..36d462a1be 100644 --- a/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala @@ -1,7 +1,7 @@ // {cat=WebSocket; effects=Direct; server=Netty}: Describe and implement a WebSocket endpoint -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 package sttp.tapir.examples.websocket diff --git a/examples/src/main/scala/sttp/tapir/examples/websocket/webSocketPekkoServer.scala b/examples/src/main/scala/sttp/tapir/examples/websocket/webSocketPekkoServer.scala index 1f1281eaa5..d65aacae98 100644 --- a/examples/src/main/scala/sttp/tapir/examples/websocket/webSocketPekkoServer.scala +++ b/examples/src/main/scala/sttp/tapir/examples/websocket/webSocketPekkoServer.scala @@ -1,9 +1,9 @@ // {cat=WebSocket; effects=Future; server=Pekko HTTP}: Describe and implement a WebSocket endpoint -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-asyncapi-docs:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-pekko-http-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-asyncapi-docs:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.11.3 //> using dep com.softwaremill.sttp.apispec::asyncapi-circe-yaml:0.10.0 //> using dep com.softwaremill.sttp.client3::pekko-http-backend:3.9.7 diff --git a/generated-doc/out/client/http4s.md b/generated-doc/out/client/http4s.md index 944889b83a..6dab5e93f2 100644 --- a/generated-doc/out/client/http4s.md +++ b/generated-doc/out/client/http4s.md @@ -3,7 +3,7 @@ Add the dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % "1.11.3" ``` To interpret an endpoint definition as an `org.http4s.Request[F]`, import: diff --git a/generated-doc/out/client/play.md b/generated-doc/out/client/play.md index 64a0a74c62..197a5def4b 100644 --- a/generated-doc/out/client/play.md +++ b/generated-doc/out/client/play.md @@ -6,13 +6,13 @@ See the [Play framework documentation](https://www.playframework.com/documentati For **Play 3.0**, add the dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-play-client" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-play-client" % "1.11.3" ``` For **Play 2.9**, add ```scala -"com.softwaremill.sttp.tapir" %% "tapir-play29-client" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-play29-client" % "1.11.3" ``` instead. Furthermore, replace all uses of `sttp.capabilities.pekko.PekkoStreams` in the following code snippets with `sttp.capabilities.akka.AkkaStreams`. diff --git a/generated-doc/out/client/sttp.md b/generated-doc/out/client/sttp.md index fb1219d526..c5ce87809a 100644 --- a/generated-doc/out/client/sttp.md +++ b/generated-doc/out/client/sttp.md @@ -3,7 +3,7 @@ Add the dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-sttp-client" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-client" % "1.11.3" ``` To make requests using an endpoint definition using the [sttp client](https://github.com/softwaremill/sttp), import: @@ -101,7 +101,7 @@ In this case add the following dependencies (note the [`%%%`](https://www.scala- instead of the usual `%%`): ```scala -"com.softwaremill.sttp.tapir" %%% "tapir-sttp-client" % "1.11.2" +"com.softwaremill.sttp.tapir" %%% "tapir-sttp-client" % "1.11.3" "io.github.cquiroz" %%% "scala-java-time" % "2.2.0" // implementations of java.time classes for Scala.JS ``` diff --git a/generated-doc/out/docs/asyncapi.md b/generated-doc/out/docs/asyncapi.md index afacc486e1..cbd772b8a9 100644 --- a/generated-doc/out/docs/asyncapi.md +++ b/generated-doc/out/docs/asyncapi.md @@ -3,7 +3,7 @@ To use, add the following dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-asyncapi-docs" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-asyncapi-docs" % "1.11.3" "com.softwaremill.sttp.apispec" %% "asyncapi-circe-yaml" % "..." // see https://github.com/softwaremill/sttp-apispec ``` diff --git a/generated-doc/out/docs/json-schema.md b/generated-doc/out/docs/json-schema.md index 840a9ec25c..cabce6100d 100644 --- a/generated-doc/out/docs/json-schema.md +++ b/generated-doc/out/docs/json-schema.md @@ -3,7 +3,7 @@ You can conveniently generate JSON schema from Tapir schema, which can be derived from your Scala types. Use `TapirSchemaToJsonSchema`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-apispec-docs" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-apispec-docs" % "1.11.3" ``` Schema generation can now be performed like in the following example: diff --git a/generated-doc/out/docs/openapi.md b/generated-doc/out/docs/openapi.md index 3bd45cf786..41021769d0 100644 --- a/generated-doc/out/docs/openapi.md +++ b/generated-doc/out/docs/openapi.md @@ -13,7 +13,7 @@ these steps can be done separately, giving you complete control over the process To generate OpenAPI documentation and expose it using the Swagger UI in a single step, first add the dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.11.3" ``` Then, you can interpret a list of endpoints using `SwaggerInterpreter`. The result will be a list of file-serving @@ -55,7 +55,7 @@ for details. Similarly as above, you'll need the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-redoc-bundle" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-redoc-bundle" % "1.11.3" ``` And the server endpoints can be generated using the `sttp.tapir.redoc.bundle.RedocInterpreter` class. @@ -65,7 +65,7 @@ And the server endpoints can be generated using the `sttp.tapir.redoc.bundle.Red To generate the docs in the OpenAPI yaml format, add the following dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.3" "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "..." // see https://github.com/softwaremill/sttp-apispec ``` @@ -133,7 +133,7 @@ For example, generating the OpenAPI 3.0.3 YAML string can be achieved by perform Firstly add dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.3" "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % "..." // see https://github.com/softwaremill/sttp-apispec ``` @@ -163,12 +163,12 @@ The modules `tapir-swagger-ui` and `tapir-redoc` contain server endpoint definit yaml format, will expose it using the given context path. To use, add as a dependency either `tapir-swagger-ui`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui" % "1.11.3" ``` or `tapir-redoc`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-redoc" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-redoc" % "1.11.3" ``` Then, you'll need to pass the server endpoints to your server interpreter. For example, using akka-http: diff --git a/generated-doc/out/endpoint/integrations.md b/generated-doc/out/endpoint/integrations.md index 3d5bb980b8..5268ef26b1 100644 --- a/generated-doc/out/endpoint/integrations.md +++ b/generated-doc/out/endpoint/integrations.md @@ -12,7 +12,7 @@ The `tapir-cats` module contains additional instances for some [cats](https://ty datatypes as well as additional syntax: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-cats" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-cats" % "1.11.3" ``` - `import sttp.tapir.integ.cats.codec.*` - brings schema, validator and codec instances @@ -22,7 +22,7 @@ Additionally, the `tapir-cats-effect` module contains an implementation of the ` between the sttp-internal `MonadError` and the cats-effect `Sync` typeclass: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-cats-effect" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-cats-effect" % "1.11.3" ``` ## Refined integration @@ -31,7 +31,7 @@ If you use [refined](https://github.com/fthomas/refined), the `tapir-refined` mo validators for `T Refined P` as long as a codec for `T` already exists: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-refined" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-refined" % "1.11.3" ``` You'll need to extend the `sttp.tapir.codec.refined.TapirCodecRefined` @@ -52,7 +52,7 @@ If you use [iron](https://github.com/Iltotore/iron), the `tapir-iron` module wil validators for `T :| P` as long as a codec for `T` already exists: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-iron" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-iron" % "1.11.3" ``` The module is only available for Scala 3 since iron is not designed to work with Scala 2. @@ -145,7 +145,7 @@ The `tapir-enumeratum` module provides schemas, validators and codecs for [Enume enumerations. To use, add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-enumeratum" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-enumeratum" % "1.11.3" ``` Then, `import sttp.tapir.codec.enumeratum.*`, or extends the `sttp.tapir.codec.enumeratum.TapirCodecEnumeratum` trait. @@ -158,7 +158,7 @@ If you use [scala-newtype](https://github.com/estatico/scala-newtype), the `tapi schemas for types with a `@newtype` and `@newsubtype` annotations as long as a codec and schema for its underlying value already exists: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-newtype" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-newtype" % "1.11.3" ``` Then, `import sttp.tapir.codec.newtype.*`, or extend the `sttp.tapir.codec.newtype.TapirCodecNewType` trait to bring the implicit values into scope. @@ -169,7 +169,7 @@ If you use [monix newtypes](https://github.com/monix/newtypes), the `tapir-monix schemas for types which extend `NewtypeWrapped` and `NewsubtypeWrapped` annotations as long as a codec and schema for its underlying value already exists: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-monix-newtype" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-monix-newtype" % "1.11.3" ``` Then, `import sttp.tapir.codec.monix.newtype.*`, or extend the `sttp.tapir.codec.monix.newtype.TapirCodecMonixNewType` trait to bring the implicit values into scope. @@ -180,7 +180,7 @@ If you use [ZIO Prelude Newtypes](https://zio.github.io/zio-prelude/docs/newtype schemas for types defined using `Newtype` and `Subtype` as long as a codec and a schema for the underlying type already exists: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio-prelude" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-zio-prelude" % "1.11.3" ``` Then, mix in `sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeSupport` into your newtype to bring the implicit values into scope: @@ -219,7 +219,7 @@ For details refer to [derevo documentation](https://github.com/tofu-tf/derevo#in To use, add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-derevo" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-derevo" % "1.11.3" ``` Then you can derive schema for your ADT along with other typeclasses besides ADT declaration itself: diff --git a/generated-doc/out/endpoint/json.md b/generated-doc/out/endpoint/json.md index 405abc72fb..e029e8d30d 100644 --- a/generated-doc/out/endpoint/json.md +++ b/generated-doc/out/endpoint/json.md @@ -50,7 +50,7 @@ stringJsonBody.schema(implicitly[Schema[MyBody]].as[String]) To use [Circe](https://github.com/circe/circe), add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonCirce` trait, see [MyTapir](../other/mytapir.md)): @@ -122,7 +122,7 @@ Now the above JSON object will render as To use [µPickle](http://www.lihaoyi.com/upickle/) add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-upickle" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-upickle" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonuPickle` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonuPickle` not `TapirCirceJson`): @@ -156,13 +156,13 @@ For more examples, including making a custom encoder/decoder, see [TapirJsonuPic To use [Play JSON](https://github.com/playframework/play-json) for **Play 3.0**, add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-play" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-play" % "1.11.3" ``` For **Play 2.9** use: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-play29" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-play29" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonPlay` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonPlay` not `TapirCirceJson`): @@ -178,7 +178,7 @@ Play JSON requires `Reads` and `Writes` implicit values in scope for each type y To use [Spray JSON](https://github.com/spray/spray-json) add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-spray" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-spray" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonSpray` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonSpray` not `TapirCirceJson`): @@ -194,7 +194,7 @@ Spray JSON requires a `JsonFormat` implicit value in scope for each type you wan To use [Tethys JSON](https://github.com/tethys-json/tethys) add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-tethys" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-tethys" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonTethys` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonTethys` not `TapirCirceJson`): @@ -210,7 +210,7 @@ Tethys JSON requires `JsonReader` and `JsonWriter` implicit values in scope for To use [Jsoniter-scala](https://github.com/plokhotnyuk/jsoniter-scala) add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-jsoniter-scala" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-jsoniter-scala" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonJsoniter` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonJsoniter` not `TapirCirceJson`): @@ -226,7 +226,7 @@ Jsoniter Scala requires `JsonValueCodec` implicit value in scope for each type y To use [json4s](https://github.com/json4s/json4s) add the following dependencies to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-json4s" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-json4s" % "1.11.3" ``` And one of the implementations: @@ -257,7 +257,7 @@ given Formats = org.json4s.jackson.Serialization.formats(NoTypeHints) To use [zio-json](https://github.com/zio/zio-json), add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.11.3" ``` Next, import the package (or extend the `TapirJsonZio` trait, see [MyTapir](../other/mytapir.md) and add `TapirJsonZio` instead of `TapirCirceJson`): diff --git a/generated-doc/out/endpoint/pickler.md b/generated-doc/out/endpoint/pickler.md index f2d06522f0..2f72df5d30 100644 --- a/generated-doc/out/endpoint/pickler.md +++ b/generated-doc/out/endpoint/pickler.md @@ -9,7 +9,7 @@ In [other](json.md) tapir-JSON integrations, you have to keep the `Schema` (whic To use pickler, add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-pickler" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-json-pickler" % "1.11.3" ``` Please note that it is available only for Scala 3 and Scala.JS 3. diff --git a/generated-doc/out/endpoint/static.md b/generated-doc/out/endpoint/static.md index 61476d6de1..876a63ed7b 100644 --- a/generated-doc/out/endpoint/static.md +++ b/generated-doc/out/endpoint/static.md @@ -11,7 +11,7 @@ the API documentation of the old static content API, switch documentation to an In order to use static content endpoints, add the module to your dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-files" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-files" % "1.11.3" ``` ## Files diff --git a/generated-doc/out/generator/sbt-openapi-codegen.md b/generated-doc/out/generator/sbt-openapi-codegen.md index dbab433744..a77488b7ed 100644 --- a/generated-doc/out/generator/sbt-openapi-codegen.md +++ b/generated-doc/out/generator/sbt-openapi-codegen.md @@ -9,7 +9,7 @@ This is a really early alpha implementation. Add the sbt plugin to the `project/plugins.sbt`: ```scala -addSbtPlugin("com.softwaremill.sttp.tapir" % "sbt-openapi-codegen" % "1.11.2") +addSbtPlugin("com.softwaremill.sttp.tapir" % "sbt-openapi-codegen" % "1.11.3") ``` Enable the plugin for your project in the `build.sbt`: diff --git a/generated-doc/out/includes/examples_list.md b/generated-doc/out/includes/examples_list.md index dff7f0c0f2..1a6a66d009 100644 --- a/generated-doc/out/includes/examples_list.md +++ b/generated-doc/out/includes/examples_list.md @@ -10,7 +10,7 @@ * [Exposing an endpoint using the ZIO HTTP server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/HelloWorldZioHttpServer.scala) ZIO ZIO JSON ZIO HTTP * [Exposing an endpoint using the ZIO HTTP server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/ZioExampleZioHttpServer.scala) Swagger UI ZIO circe zio-http * [Exposing an endpoint using the built-in JDK HTTP server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/helloWorldJdkHttpServer.scala) Direct JDK Http -* [Exposing an endpoint using the http4s server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala) Future http4s +* [Exposing an endpoint using the http4s server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/HelloWorldHttp4sServer.scala) cats-effect http4s * [Exposing an endpoint using the http4s server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/ZioExampleHttp4sServer.scala) Swagger UI ZIO circe http4s * [Exposing an endpoint, defined with ZIO and depending on services in the environment, using the http4s server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/ZioEnvExampleHttp4sServer.scala) Swagger UI ZIO circe http4s * [Extending a base endpoint (which has the security logic provided), with server logic](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/ZioPartialServerLogicHttp4s.scala) ZIO http4s @@ -95,10 +95,12 @@ ## Testing * [Test endpoints using the MockServer client](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/testing/SttpMockServerClientExample.scala) circe -* [Test endpoints using the TapirStubInterpreter](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreterExample.scala) Future Pekko HTTP +* [Test endpoints using the TapirStubInterpreter](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/testing/CatsServerStubInterpreter.scala) cats-effect +* [Test endpoints using the TapirStubInterpreter](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/testing/PekkoServerStubInterpreter.scala) Future Pekko HTTP ## WebSocket +* [A WebSocket chat across multiple clients connected to the same server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketChatNettySyncServer.scala) Direct Netty * [Describe and implement a WebSocket endpoint](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala) Direct Netty * [Describe and implement a WebSocket endpoint](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/websocket/webSocketPekkoServer.scala) Future Pekko HTTP * [Describe and implement a WebSocket endpoint](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketHttp4sServer.scala) AsyncAPI cats-effect circe http4s \ No newline at end of file diff --git a/generated-doc/out/quickstart.md b/generated-doc/out/quickstart.md index 4187d7f2f6..3db6c4bfcb 100644 --- a/generated-doc/out/quickstart.md +++ b/generated-doc/out/quickstart.md @@ -3,7 +3,7 @@ To use tapir, add the following dependency to your project: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.3" ``` This will import only the core classes needed to create endpoint descriptions. To generate a server or a client, you diff --git a/generated-doc/out/server/akkahttp.md b/generated-doc/out/server/akkahttp.md index 56d3e549aa..d7dee4da61 100644 --- a/generated-doc/out/server/akkahttp.md +++ b/generated-doc/out/server/akkahttp.md @@ -4,14 +4,14 @@ To expose an endpoint as an [akka-http](https://doc.akka.io/docs/akka-http/curre dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.3" ``` This will transitively pull some Akka modules in version 2.6. If you want to force your own Akka version (for example 2.5), use sbt exclusion. Mind the Scala version in artifact name: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.2" exclude("com.typesafe.akka", "akka-stream_2.12") +"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.3" exclude("com.typesafe.akka", "akka-stream_2.12") ``` Now import the object: diff --git a/generated-doc/out/server/armeria.md b/generated-doc/out/server/armeria.md index bd43884abe..1dcca2f959 100644 --- a/generated-doc/out/server/armeria.md +++ b/generated-doc/out/server/armeria.md @@ -8,7 +8,7 @@ Armeria interpreter can be used with different effect systems (cats-effect, ZIO) Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-armeria-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server" % "1.11.3" ``` and import the object: @@ -71,7 +71,7 @@ Note that Armeria automatically injects an `ExecutionContext` on top of Armeria' Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-cats" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-cats" % "1.11.3" ``` to use this interpreter with Cats Effect typeclasses. @@ -148,7 +148,7 @@ val tapirService = ArmeriaCatsServerInterpreter(dispatcher).toService(streamingR Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-zio" % "1.11.3" ``` to use this interpreter with ZIO. diff --git a/generated-doc/out/server/aws.md b/generated-doc/out/server/aws.md index 884e579be7..5806def0e9 100644 --- a/generated-doc/out/server/aws.md +++ b/generated-doc/out/server/aws.md @@ -30,7 +30,7 @@ These are corresponding classes for each of the supported runtime: To start using any of the above add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-aws-lambda" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-aws-lambda" % "1.11.3" ``` ## Deployment @@ -41,9 +41,9 @@ Tapir leverages ways of doing it provided by AWS, you can choose from: AWS SAM t You can start by adding one of the following dependencies to your project, and then follow examples: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-aws-sam" % "1.11.2" -"com.softwaremill.sttp.tapir" %% "tapir-aws-terraform" % "1.11.2" -"com.softwaremill.sttp.tapir" %% "tapir-aws-cdk" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-aws-sam" % "1.11.3" +"com.softwaremill.sttp.tapir" %% "tapir-aws-terraform" % "1.11.3" +"com.softwaremill.sttp.tapir" %% "tapir-aws-cdk" % "1.11.3" ``` ### Examples diff --git a/generated-doc/out/server/finatra.md b/generated-doc/out/server/finatra.md index 29fe95bf09..677eb6ed78 100644 --- a/generated-doc/out/server/finatra.md +++ b/generated-doc/out/server/finatra.md @@ -4,7 +4,7 @@ To expose an endpoint as an [finatra](https://twitter.github.io/finatra/) server dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-finatra-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-finatra-server" % "1.11.3" ``` and import the object: @@ -17,7 +17,7 @@ This interpreter supports the twitter `Future`. Or, if you would like to use cats-effect project, you can add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-finatra-server-cats" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-finatra-server-cats" % "1.11.3" ``` and import the object: diff --git a/generated-doc/out/server/http4s.md b/generated-doc/out/server/http4s.md index 87eb63f837..04c960b221 100644 --- a/generated-doc/out/server/http4s.md +++ b/generated-doc/out/server/http4s.md @@ -4,7 +4,7 @@ To expose an endpoint as an [http4s](https://http4s.org) server, first add the f dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % "1.11.3" ``` and import the object: diff --git a/generated-doc/out/server/jdkhttp.md b/generated-doc/out/server/jdkhttp.md index fad980a307..1ddda5376b 100644 --- a/generated-doc/out/server/jdkhttp.md +++ b/generated-doc/out/server/jdkhttp.md @@ -5,7 +5,7 @@ To expose endpoints using the (`com.sun.net.httpserver`), first add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-jdkhttp-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-jdkhttp-server" % "1.11.3" ``` Then, import the package: diff --git a/generated-doc/out/server/netty.md b/generated-doc/out/server/netty.md index 90ad8b83ba..3ff73e831f 100644 --- a/generated-doc/out/server/netty.md +++ b/generated-doc/out/server/netty.md @@ -4,16 +4,16 @@ To expose an endpoint using a [Netty](https://netty.io)-based server, first add ```scala // if you are using Future or just exploring: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server" % "1.11.3" // if you want to use Java 21 Loom virtual threads in direct style: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-sync" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-sync" % "1.11.3" // if you are using cats-effect: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-cats" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-cats" % "1.11.3" // if you are using zio: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-zio" % "1.11.3" ``` Then, use: @@ -152,6 +152,10 @@ object WebSocketsNettyCatsServer extends ResourceApp.Forever { In the Loom-based backend, Tapir uses [Ox](https://ox.softwaremill.com) to manage concurrency, and your transformation pipeline should be represented as `Ox ?=> Source[A] => Source[B]`. Any forks started within this function will be run under a safely isolated internal scope. See [examples/websocket/WebSocketNettySyncServer.scala](https://github.com/softwaremill/tapir/blob/master/examples/src/main/scala/sttp/tapir/examples/websocket/WebSocketNettySyncServer.scala) for a full example. +```{note} +The pipeline transform a source of incoming web socket messages (received from the client), into a source of outgoing web socket messages (which will be sent to the client), within some concurrency scope. Once the incoming source is done, the client has closed the connection. In that case, remember to close the outgoing source as well: otherwise the scope will leak and won't be closed. An error will be logged if the outgoing channel is not closed within a timeout after a close frame is received. +``` + ## Graceful shutdown A Netty server can be gracefully closed using the function `NettyFutureServerBinding.stop()` (and analogous functions available in Cats and ZIO bindings). This function ensures that the server will wait at most 10 seconds for in-flight requests to complete, while rejecting all new requests with 503 during this period. Afterwards, it closes all server resources. diff --git a/generated-doc/out/server/nima.md b/generated-doc/out/server/nima.md index c9053fd6b2..a365bc06da 100644 --- a/generated-doc/out/server/nima.md +++ b/generated-doc/out/server/nima.md @@ -8,7 +8,7 @@ To expose an endpoint as a [Helidon Níma](https://helidon.io/nima) server, firs dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-nima-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-nima-server" % "1.11.3" ``` Loom-managed concurrency uses direct style instead of effect wrappers like `Future[T]` or `IO[T]`. Because of this, diff --git a/generated-doc/out/server/observability.md b/generated-doc/out/server/observability.md index 47dc807758..87530fd613 100644 --- a/generated-doc/out/server/observability.md +++ b/generated-doc/out/server/observability.md @@ -49,7 +49,7 @@ val labels = MetricLabels( Add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-prometheus-metrics" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-prometheus-metrics" % "1.11.3" ``` `PrometheusMetrics` encapsulates `PrometheusReqistry` and `Metric` instances. It provides several ready to use metrics as @@ -128,7 +128,7 @@ val prometheusMetrics = PrometheusMetrics[Future]("tapir", PrometheusRegistry.de Add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-opentelemetry-metrics" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-opentelemetry-metrics" % "1.11.3" ``` OpenTelemetry metrics are vendor-agnostic and can be exported using one @@ -155,7 +155,7 @@ val metricsInterceptor = metrics.metricsInterceptor() // add to your server opti Add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-datadog-metrics" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-datadog-metrics" % "1.11.3" ``` Datadog metrics are sent as Datadog custom metrics through @@ -222,7 +222,7 @@ val datadogMetrics = DatadogMetrics.default[Future](statsdClient) Add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio-metrics" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-zio-metrics" % "1.11.3" ``` Metrics have been integrated into ZIO core in ZIO2. diff --git a/generated-doc/out/server/pekkohttp.md b/generated-doc/out/server/pekkohttp.md index 9454fcbc5b..fdd42d9433 100644 --- a/generated-doc/out/server/pekkohttp.md +++ b/generated-doc/out/server/pekkohttp.md @@ -4,14 +4,14 @@ To expose an endpoint as a [pekko-http](https://pekko.apache.org/docs/pekko-http dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.3" ``` This will transitively pull some Pekko modules. If you want to force your own Pekko version, use sbt exclusion. Mind the Scala version in artifact name: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.2" exclude("org.apache.pekko", "pekko-stream_2.12") +"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.3" exclude("org.apache.pekko", "pekko-stream_2.12") ``` Now import the object: diff --git a/generated-doc/out/server/play.md b/generated-doc/out/server/play.md index a1639b5d40..413c84a0cf 100644 --- a/generated-doc/out/server/play.md +++ b/generated-doc/out/server/play.md @@ -6,7 +6,7 @@ See the [Play framework documentation](https://www.playframework.com/documentati To expose an endpoint as a [play-server](https://www.playframework.com/), using **Play 2.9 with Akka**, add the following dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-play29-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-play29-server" % "1.11.3" ``` and (if you don't already depend on Play) @@ -26,7 +26,7 @@ depending on whether you want to use netty or Akka based http-server under the h To expose an endpoint as a [play-server](https://www.playframework.com/), using **Play 3.0 with Pekko**, add the following dependencies: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-play-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-play-server" % "1.11.3" ``` and (if you don't already depend on Play) diff --git a/generated-doc/out/server/vertx.md b/generated-doc/out/server/vertx.md index 0edb430594..fea90fd713 100644 --- a/generated-doc/out/server/vertx.md +++ b/generated-doc/out/server/vertx.md @@ -8,7 +8,7 @@ Vert.x interpreter can be used with different effect systems (cats-effect, ZIO) Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-vertx-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server" % "1.11.3" ``` to use this interpreter with `Future`. @@ -60,7 +60,7 @@ It's also possible to define an endpoint together with the server logic in a sin Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-cats" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-cats" % "1.11.3" ``` to use this interpreter with Cats Effect typeclasses. @@ -140,7 +140,7 @@ val attach = VertxCatsServerInterpreter(dispatcher).route(streamedResponse.serve Add the following dependency ```scala -"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-zio" % "1.11.3" ``` to use this interpreter with ZIO. diff --git a/generated-doc/out/server/zio-http4s.md b/generated-doc/out/server/zio-http4s.md index 6acb22107d..91ddd9546e 100644 --- a/generated-doc/out/server/zio-http4s.md +++ b/generated-doc/out/server/zio-http4s.md @@ -8,13 +8,13 @@ The `*-zio` modules depend on ZIO 2.x. You'll need the following dependency for the `ZServerEndpoint` type alias and helper classes: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.3" ``` or just add the zio-http4s integration which already depends on `tapir-zio`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-http4s-server-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-server-zio" % "1.11.3" ``` Next, instead of the usual `import sttp.tapir.*`, you should import (or extend the `ZTapir` trait, see [MyTapir](../other/mytapir.md)): diff --git a/generated-doc/out/server/ziohttp.md b/generated-doc/out/server/ziohttp.md index bf273c92c5..74f2599e23 100644 --- a/generated-doc/out/server/ziohttp.md +++ b/generated-doc/out/server/ziohttp.md @@ -8,13 +8,13 @@ The `*-zio` modules depend on ZIO 2.x. You'll need the following dependency for the `ZServerEndpoint` type alias and helper classes: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.3" ``` or just add the zio-http integration which already depends on `tapir-zio`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % "1.11.3" ``` Next, instead of the usual `import sttp.tapir.*`, you should import (or extend the `ZTapir` trait, see [MyTapir](../other/mytapir.md)): diff --git a/generated-doc/out/testing.md b/generated-doc/out/testing.md index bc4a2d97c2..76b7b9165c 100644 --- a/generated-doc/out/testing.md +++ b/generated-doc/out/testing.md @@ -23,7 +23,7 @@ Tapir builds upon the `SttpBackendStub` to enable stubbing using `Endpoint`s or dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.3" ``` Let's assume you are using the [pekko http](server/pekkohttp.md) interpreter. Given the following server endpoint: @@ -139,7 +139,7 @@ requests matching an endpoint, you can use the tapir `SttpBackendStub` extension Similarly as when testing server interpreters, add the dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.3" ``` And the following imports: @@ -194,7 +194,7 @@ with [mock-server](https://www.mock-server.com/) Add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "sttp-mock-server" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "sttp-mock-server" % "1.11.3" ``` Imports: @@ -265,7 +265,7 @@ result == out To use, add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-testing" % "1.11.2" +"com.softwaremill.sttp.tapir" %% "tapir-testing" % "1.11.3" ``` ### Shadowed endpoints diff --git a/generated-doc/out/tutorials/01_hello_world.md b/generated-doc/out/tutorials/01_hello_world.md index 877bb4fa72..8f20096b30 100644 --- a/generated-doc/out/tutorials/01_hello_world.md +++ b/generated-doc/out/tutorials/01_hello_world.md @@ -22,8 +22,8 @@ multiple servers, but we'll choose the simplest (and also one of the fastest!), available through the `tapir-netty-server-sync` module: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 ``` ## Endpoint description @@ -43,8 +43,8 @@ Let's start by defining the method and path of our endpoint: {emphasize-lines="4-11"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* @@ -72,8 +72,8 @@ of requiring it to be a fixed value (a constant): {emphasize-lines="10"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* @@ -97,8 +97,8 @@ Finally, let's add an output to the endpoint. We'll return the response as a str {emphasize-lines="11"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* @@ -123,8 +123,8 @@ will be sent as a response: {emphasize-lines="12"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* @@ -152,8 +152,8 @@ example, we'll bind to `localhost` (which is the default), and to the port 8080: {emphasize-lines="5, 15-18"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* import sttp.tapir.server.netty.sync.NettySyncServer diff --git a/generated-doc/out/tutorials/02_openapi_docs.md b/generated-doc/out/tutorials/02_openapi_docs.md index 37d02e8bfe..aa1e2baf4b 100644 --- a/generated-doc/out/tutorials/02_openapi_docs.md +++ b/generated-doc/out/tutorials/02_openapi_docs.md @@ -17,16 +17,16 @@ use a bundle, which first interprets the provided tapir endpoints into OpenAPI a endpoints, which expose the UI together with the generated specification. We'll need to add a dependency: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 ``` We'll also define and expose two endpoints as an HTTP server, as described in the previous tutorial. Hence, our starting setup of `docs.scala` is as follows: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 import sttp.tapir.* import sttp.tapir.server.netty.sync.NettySyncServer @@ -108,9 +108,9 @@ And that's almost all the code changes that we need to introduce! We only need t {emphasize-lines="3, 5, 8, 24-25, 29"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 import sttp.shared.Identity import sttp.tapir.* diff --git a/generated-doc/out/tutorials/03_json.md b/generated-doc/out/tutorials/03_json.md index ecadd63905..aafb533caf 100644 --- a/generated-doc/out/tutorials/03_json.md +++ b/generated-doc/out/tutorials/03_json.md @@ -83,7 +83,7 @@ In our case, deriving the schemas will amount to adding a `... derives Schema` c {emphasize-lines="1, 7, 10, 12, 16"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 //> using dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.30.1 import com.github.plokhotnyuk.jsoniter_scala.core.* // needed for `writeToString` @@ -127,10 +127,10 @@ how the `jsonBody[T]` method is used in the endpoint definition. We'll also expo {emphasize-lines="2-4, 10-15, 23-39"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.3 //> using dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.30.1 import com.github.plokhotnyuk.jsoniter_scala.macros.* // needed for ... derives diff --git a/generated-doc/out/tutorials/04_errors.md b/generated-doc/out/tutorials/04_errors.md index 2c0537f58d..f635b9853b 100644 --- a/generated-doc/out/tutorials/04_errors.md +++ b/generated-doc/out/tutorials/04_errors.md @@ -40,8 +40,8 @@ schemas both for the `Result` and `Error` classes, to represent them properly in describing the endpoint: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.3 //> using dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.30.1 import com.github.plokhotnyuk.jsoniter_scala.macros.* @@ -76,10 +76,10 @@ We'll also add code to expose the endpoint as a server, along with its OpenAPI d {emphasize-lines="2-3, 11-13, 24-28, 30-36"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.3 //> using dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.30.1 import com.github.plokhotnyuk.jsoniter_scala.macros.* @@ -152,10 +152,10 @@ you'll also get `ERROR` logs when unhandled exceptions happen: {emphasize-lines="6, 26"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.3 //> using dep com.github.plokhotnyuk.jsoniter-scala::jsoniter-scala-macros:2.30.1 //> using dep ch.qos.logback:logback-classic:1.5.6 diff --git a/generated-doc/out/tutorials/05_multiple_inputs_outputs.md b/generated-doc/out/tutorials/05_multiple_inputs_outputs.md index ce0d5a3a9a..13e1d00c43 100644 --- a/generated-doc/out/tutorials/05_multiple_inputs_outputs.md +++ b/generated-doc/out/tutorials/05_multiple_inputs_outputs.md @@ -24,7 +24,7 @@ body, but additionally the hash of the result should be included in the `X-Resul Below is the endpoint description; we'll be editing the `multiple.scala` file: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.tapir.* @@ -61,8 +61,8 @@ The output tuple is then mapped to the response body & header: {emphasize-lines="5, 8-9, 18-29"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* import sttp.tapir.server.netty.sync.NettySyncServer @@ -147,8 +147,8 @@ The mapping functions are simple, but quite boring to write: {emphasize-lines="8, 17-18, 23-27"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* import sttp.tapir.server.netty.sync.NettySyncServer @@ -197,8 +197,8 @@ Here's the modified code using `.mapInTo`, which additionally maps outputs to th {emphasize-lines="9, 11-13, 19, 22"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 import sttp.tapir.* import sttp.tapir.server.netty.sync.NettySyncServer diff --git a/generated-doc/out/tutorials/06_error_variants.md b/generated-doc/out/tutorials/06_error_variants.md index 3d4f1ca8fb..281187be39 100644 --- a/generated-doc/out/tutorials/06_error_variants.md +++ b/generated-doc/out/tutorials/06_error_variants.md @@ -83,7 +83,7 @@ request serializing `AvatarSuccess.Redirect` instances, as Tapir knows nothing a an `EndpointOutput[String]`: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.model.{HeaderNames, StatusCode} import sttp.tapir.* @@ -106,7 +106,7 @@ this output to the `AvatarSuccess.Redirect` type using `.mapTo`, which we've lea {emphasize-lines="12-13"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.model.{HeaderNames, StatusCode} import sttp.tapir.* @@ -138,7 +138,7 @@ each of which translates to a separate class. Our one-of successful output takes {emphasize-lines="13-16"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.model.{HeaderNames, StatusCode} import sttp.tapir.* @@ -175,7 +175,7 @@ To fix this, we can use the `oneOfVariantSingletonMatcher` method. It takes a un value, to which the high-level output must be equal, for the variant to be chosen: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.model.{HeaderNames, StatusCode} import sttp.tapir.* @@ -197,9 +197,9 @@ val errorOutput: EndpointOutput[AvatarError] = oneOf( Equipped with `oneOf` outputs, we can now fully describe and test our endpoint: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 import sttp.model.{HeaderNames, StatusCode} import sttp.tapir.* diff --git a/generated-doc/out/tutorials/07_cats_effect.md b/generated-doc/out/tutorials/07_cats_effect.md index b8ce5be68c..c58923471e 100644 --- a/generated-doc/out/tutorials/07_cats_effect.md +++ b/generated-doc/out/tutorials/07_cats_effect.md @@ -21,7 +21,7 @@ use. Hence, we'll start with the same basic endpoint description. We'll be editing the `cats-effect.scala` file: ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 import sttp.tapir.* @@ -56,8 +56,8 @@ parameter explicitly, using `.serverLogic[IO]` in our case: {emphasize-lines="2, 4, 12-14"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-cats:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-cats:1.11.3 import cats.effect.IO import sttp.tapir.* @@ -102,8 +102,8 @@ The conversion process is an almost-one-liner (if it wasn't for line length limi {emphasize-lines="2, 5, 7, 18-19"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 import cats.effect.IO import org.http4s.HttpRoutes @@ -130,8 +130,8 @@ standard code to start a server and handle requests until the application is int {emphasize-lines="3, 5, 7, 8, 12, 24-30"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 import cats.effect.{ExitCode, IO, IOApp} @@ -192,9 +192,9 @@ the second step that we need to perform: {emphasize-lines="3, 7, 13, 27-32, 37"} ```scala -//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.2 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.2 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.3 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.3 //> using dep org.http4s::http4s-blaze-server:0.23.16 import cats.effect.{ExitCode, IO, IOApp} diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/caching/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/caching/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/caching/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/caching/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/minimal/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/minimal/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/minimal/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/minimal/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter_scala3/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter_scala3/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter_scala3/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_jsoniter_scala3/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_scala3/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_scala3/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_scala3/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/oneOf-json-roundtrip_scala3/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/option-overrides/project/build.properties b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/option-overrides/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/option-overrides/project/build.properties +++ b/openapi-codegen/sbt-plugin/src/sbt-test/sbt-openapi-codegen/option-overrides/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/project/Versions.scala b/project/Versions.scala index f1303241c8..af92e8d446 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,5 +1,5 @@ object Versions { - val http4s = "0.23.27" + val http4s = "0.23.28" val http4sBlazeServer = "0.23.16" val http4sBlazeClient = "0.23.16" val catsCore = "2.12.0" @@ -15,7 +15,7 @@ object Versions { val akkaHttp = "10.2.10" val akkaStreams = "2.6.20" val pekkoHttp = "1.0.1" - val pekkoStreams = "1.1.0" + val pekkoStreams = "1.1.1" val swaggerUi = "5.17.14" val upickle = "3.3.1" val playJson = "3.0.1" @@ -28,7 +28,7 @@ object Versions { val ox = "0.3.8" val reactiveStreams = "1.0.4" val sprayJson = "1.3.6" - val scalaCheck = "1.18.0" + val scalaCheck = "1.18.1" val scalaTest = "3.2.18" val scalaTags = "0.13.1" val scalaTestPlusScalaCheck = "3.2.19.0" diff --git a/project/build.properties b/project/build.properties index ee4c672cd0..0b699c3052 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=1.10.2 diff --git a/project/plugins.sbt b/project/plugins.sbt index 9d16a14a1b..739f0733f9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -8,7 +8,7 @@ addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-tes //addSbtPlugin("io.spray" % "sbt-boilerplate" % "0.6.1") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "2.0.7") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.0") addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0") addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") diff --git a/server/tests/src/main/scala/sttp/tapir/server/tests/ServerBasicTests.scala b/server/tests/src/main/scala/sttp/tapir/server/tests/ServerBasicTests.scala index f44fef582c..0c36b93340 100644 --- a/server/tests/src/main/scala/sttp/tapir/server/tests/ServerBasicTests.scala +++ b/server/tests/src/main/scala/sttp/tapir/server/tests/ServerBasicTests.scala @@ -690,6 +690,22 @@ class ServerBasicTests[F[_], OPTIONS, ROUTE]( basicRequest.get(uri"$baseUri/p1/abc").send(backend).map(_.code shouldBe StatusCode.BadRequest) >> basicRequest.post(uri"$baseUri/p1/123").send(backend).map(_.code shouldBe StatusCode.Ok) >> basicRequest.post(uri"$baseUri/p1/abc").send(backend).map(_.code shouldBe StatusCode.Ok) + }, + testServer( + "two endpoints with fixed path & path capture as the middle component", + NonEmptyList.of( + route( + List[ServerEndpoint[Any, F]]( + endpoint.get.in("p1" / "p2" / "p3").out(stringBody).serverLogic(_ => pureResult("1".asRight[Unit])), + endpoint.get.in("p1" / path[String]("p") / "p3").out(stringBody).serverLogic((v: String) => pureResult(s"2: $v".asRight[Unit])) + ) + ) + ) + ) { (backend, baseUri) => + basicRequest.get(uri"$baseUri/p1/p2/p3").send(backend).map(_.body shouldBe Right("1")) >> + basicRequest.get(uri"$baseUri/p1/x/p3").send(backend).map(_.body shouldBe Right("2: x")) >> + basicRequest.get(uri"$baseUri/p1/y/p3").send(backend).map(_.body shouldBe Right("2: y")) >> + basicRequest.get(uri"$baseUri/p1/p2/p4").send(backend).map(_.code shouldBe StatusCode.NotFound) } )