diff --git a/README.md b/README.md index 2d1a7f68b4..cc06906c7c 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ val booksListingRequest: Request[DecodeResult[Either[String, List[Book]]], Any] Add the following dependency: ```sbt -"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.11" ``` Then, import: diff --git a/generated-doc/out/adopters/flo.svg b/generated-doc/out/adopters/flo.svg new file mode 100644 index 0000000000..c9a763252c --- /dev/null +++ b/generated-doc/out/adopters/flo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/generated-doc/out/client/http4s.md b/generated-doc/out/client/http4s.md index 039ee2e7bb..d29cd22b35 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-client" % "1.11.11" ``` 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 727776f2ea..a930f3a345 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-play-client" % "1.11.11" ``` For **Play 2.9**, add ```scala -"com.softwaremill.sttp.tapir" %% "tapir-play29-client" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-play29-client" % "1.11.11" ``` 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 41d7ade2be..f30744292f 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-client" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %%% "tapir-sttp-client" % "1.11.11" "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 f4cbbf511c..17ceafc9b3 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-asyncapi-docs" % "1.11.11" "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 9b40e9541c..38ee3ca1ee 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-apispec-docs" % "1.11.11" ``` 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 f3f40ecd56..3dfc082f34 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-redoc-bundle" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.11" "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.10" +"com.softwaremill.sttp.tapir" %% "tapir-openapi-docs" % "1.11.11" "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.10" +"com.softwaremill.sttp.tapir" %% "tapir-swagger-ui" % "1.11.11" ``` or `tapir-redoc`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-redoc" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-redoc" % "1.11.11" ``` 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 f43d6ceaa9..7a7601a6fc 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-cats" % "1.11.11" ``` - `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.10" +"com.softwaremill.sttp.tapir" %% "tapir-cats-effect" % "1.11.11" ``` ## 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-refined" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-iron" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-enumeratum" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-newtype" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-monix-newtype" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-zio-prelude" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-derevo" % "1.11.11" ``` 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 0bc9a65835..337052139f 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-circe" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-upickle" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-play" % "1.11.11" ``` For **Play 2.9** use: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-json-play29" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-play29" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-spray" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-tethys" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-jsoniter-scala" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-json4s" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-zio" % "1.11.11" ``` 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 66e9959b77..d6891b417d 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-json-pickler" % "1.11.11" ``` 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 046e727ae9..cfbb428b8f 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-files" % "1.11.11" ``` ## Files diff --git a/generated-doc/out/generator/sbt-openapi-codegen.md b/generated-doc/out/generator/sbt-openapi-codegen.md index 622db4eab1..83990432e4 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.10") +addSbtPlugin("com.softwaremill.sttp.tapir" % "sbt-openapi-codegen" % "1.11.11") ``` 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 3a4cc518ca..e9f4562f9c 100644 --- a/generated-doc/out/includes/examples_list.md +++ b/generated-doc/out/includes/examples_list.md @@ -1,113 +1,113 @@ ## Hello, World! -* [A demo of Tapir's capabilities](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/booksExample.scala) circe sttp3 Swagger UI Future Pekko HTTP -* [A demo of Tapir's capabilities](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala) Pickler sttp3 Swagger UI Future Netty -* [Exposing an endpoint using the Armeria server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala) Future Armeria -* [Exposing an endpoint using the Netty server (Direct-style variant)](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala) Direct Netty -* [Exposing an endpoint using the Netty server (Future variant)](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala) Future Netty -* [Exposing an endpoint using the Netty server (cats-effect variant)](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala) cats-effect Netty -* [Exposing an endpoint using the Pekko HTTP server](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala) Future Pekko HTTP -* [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) 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 +* [A demo of Tapir's capabilities](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/booksExample.scala) circe sttp3 Swagger UI Future Pekko HTTP +* [A demo of Tapir's capabilities](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/booksPicklerExample.scala) Pickler sttp3 Swagger UI Future Netty +* [Exposing an endpoint using the Armeria server](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/helloWorldArmeriaServer.scala) Future Armeria +* [Exposing an endpoint using the Netty server (Direct-style variant)](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/helloWorldNettySyncServer.scala) Direct Netty +* [Exposing an endpoint using the Netty server (Future variant)](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/helloWorldNettyFutureServer.scala) Future Netty +* [Exposing an endpoint using the Netty server (cats-effect variant)](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/HelloWorldNettyCatsServer.scala) cats-effect Netty +* [Exposing an endpoint using the Pekko HTTP server](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/helloWorldPekkoServer.scala) Future Pekko HTTP +* [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) 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 ## Client interpreter -* [Interpreting an endpoint as an http4s client](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala) circe cats-effect +* [Interpreting an endpoint as an http4s client](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/client/Http4sClientExample.scala) circe cats-effect ## Custom types -* [A demo of Tapir's capabilities using semi-auto derivation](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala) circe sttp3 Swagger UI Future Pekko HTTP -* [A query parameter which maps to a Scala 3 enum (enumeration)](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/custom_types/enumQueryParameter.scala) Direct Netty -* [Handling comma-separated query parameters](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala) Swagger UI Direct Netty -* [Mapping a sealed trait hierarchy to JSON using a discriminator](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala) circe Swagger UI Direct Netty -* [Supporting custom types, when used in query or path parameters, as well as part of JSON bodies](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala) circe +* [A demo of Tapir's capabilities using semi-auto derivation](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/custom_types/booksExampleSemiauto.scala) circe sttp3 Swagger UI Future Pekko HTTP +* [A query parameter which maps to a Scala 3 enum (enumeration)](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/custom_types/enumQueryParameter.scala) Direct Netty +* [Handling comma-separated query parameters](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/custom_types/commaSeparatedQueryParameter.scala) Swagger UI Direct Netty +* [Mapping a sealed trait hierarchy to JSON using a discriminator](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/custom_types/sealedTraitWithDiscriminator.scala) circe Swagger UI Direct Netty +* [Supporting custom types, when used in query or path parameters, as well as part of JSON bodies](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/custom_types/EndpointWithCustomTypes.scala) circe ## Error handling -* [Customising errors that are reported on decode failures (e.g. invalid or missing query parameter)](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala) Future Pekko HTTP -* [Error and successful outputs](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala) Future circe Pekko HTTP -* [Error reporting provided by Iron type refinements](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala) circe cats-effect Netty -* [Extending a base secured endpoint with error variants, using union types](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala) circe cats-effect http4s +* [Customising errors that are reported on decode failures (e.g. invalid or missing query parameter)](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/errors/customErrorsOnDecodeFailurePekkoServer.scala) Future Pekko HTTP +* [Error and successful outputs](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/errors/errorOutputsPekkoServer.scala) Future circe Pekko HTTP +* [Error reporting provided by Iron type refinements](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/errors/IronRefinementErrorsNettyServer.scala) circe cats-effect Netty +* [Extending a base secured endpoint with error variants, using union types](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/errors/ErrorUnionTypesHttp4sServer.scala) circe cats-effect http4s ## JSON -* [Return a JSON body which optionally serializes as `null`](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/json/circeNullBody.scala) circe Direct Netty -* [Return a JSON response with Circe and auto-dervied codecs](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/json/circeAutoDerivationNettySyncServer.scala) circe Direct Netty -* [Return a JSON response with Jsoniter](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/json/jsoniterNettySyncServer.scala) jsoniter Direct Netty +* [Return a JSON body which optionally serializes as `null`](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/json/circeNullBody.scala) circe Direct Netty +* [Return a JSON response with Circe and auto-dervied codecs](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/json/circeAutoDerivationNettySyncServer.scala) circe Direct Netty +* [Return a JSON response with Jsoniter](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/json/jsoniterNettySyncServer.scala) jsoniter Direct Netty ## Logging -* [Logging using a correlation id](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala) ZIO Netty +* [Logging using a correlation id](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/logging/ZioLoggingWithCorrelationIdNettyServer.scala) ZIO Netty ## Multipart -* [Uploading a multipart form, with text and file parts](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala) Future Pekko HTTP +* [Uploading a multipart form, with text and file parts](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/multipart/multipartFormUploadPekkoServer.scala) Future Pekko HTTP ## Observability -* [Reporting DataDog metrics](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala) Future circe Netty -* [Reporting OpenTelemetry metrics](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala) Future circe Netty -* [Reporting Prometheus metrics](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala) ZIO ZIO HTTP -* [Reporting Prometheus metrics](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala) Future circe Netty +* [Reporting DataDog metrics](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/observability/datadogMetricsExample.scala) Future circe Netty +* [Reporting OpenTelemetry metrics](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/observability/openTelemetryMetricsExample.scala) Future circe Netty +* [Reporting Prometheus metrics](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/observability/ZioMetricsExample.scala) ZIO ZIO HTTP +* [Reporting Prometheus metrics](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/observability/prometheusMetricsExample.scala) Future circe Netty ## OpenAPI documentation -* [Adding OpenAPI documentation extensions](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala) circe -* [Documenting multiple endpoints](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala) Swagger UI cats-effect circe http4s -* [Documenting multiple endpoints](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala) Swagger UI Future circe Pekko HTTP -* [Exposing documentation using ReDoc](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala) ReDoc ZIO circe ZIO HTTP -* [Exposing documentation using ReDoc](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala) ReDoc cats-effect http4s -* [Securing Swagger UI using OAuth 2](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala) Swagger UI Future Pekko HTTP +* [Adding OpenAPI documentation extensions](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/openapiExtensions.scala) circe +* [Documenting multiple endpoints](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/MultipleEndpointsDocumentationHttp4sServer.scala) Swagger UI cats-effect circe http4s +* [Documenting multiple endpoints](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/multipleEndpointsDocumentationPekkoServer.scala) Swagger UI Future circe Pekko HTTP +* [Exposing documentation using ReDoc](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/RedocZioHttpServer.scala) ReDoc ZIO circe ZIO HTTP +* [Exposing documentation using ReDoc](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/RedocContextPathHttp4sServer.scala) ReDoc cats-effect http4s +* [Securing Swagger UI using OAuth 2](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/openapi/swaggerUIOAuth2PekkoServer.scala) Swagger UI Future Pekko HTTP ## Schemas -* [Customising a derived schema, using annotations, and using implicits](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala) Swagger UI Future circe Netty +* [Customising a derived schema, using annotations, and using implicits](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/schema/customisingSchemas.scala) Swagger UI Future circe Netty ## Security -* [CORS interceptor](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala) Future Pekko HTTP -* [HTTP basic authentication](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala) Future Pekko HTTP -* [Interceptor verifying externally added security credentials](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala) Future Netty -* [Login using OAuth2, authorization code flow](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala) cats-effect circe http4s -* [Separating security and server logic, with a reusable base endpoint](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala) Future Pekko HTTP -* [Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala) Future Pekko HTTP -* [Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala) ZIO ZIO HTTP +* [CORS interceptor](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/corsInterceptorPekkoServer.scala) Future Pekko HTTP +* [HTTP basic authentication](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/basicAuthenticationPekkoServer.scala) Future Pekko HTTP +* [Interceptor verifying externally added security credentials](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/externalSecurityInterceptor.scala) Future Netty +* [Login using OAuth2, authorization code flow](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/OAuth2GithubHttp4sServer.scala) cats-effect circe http4s +* [Separating security and server logic, with a reusable base endpoint](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicPekko.scala) Future Pekko HTTP +* [Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/serverSecurityLogicRefreshCookiesPekko.scala) Future Pekko HTTP +* [Separating security and server logic, with a reusable base endpoint, accepting & refreshing credentials via cookies](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/security/ServerSecurityLogicZio.scala) ZIO ZIO HTTP ## Static content -* [Serving static files from a directory](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala) Direct Netty -* [Serving static files from a directory, with range requests](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala) Future Pekko HTTP -* [Serving static files from resources](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala) Future Pekko HTTP -* [Serving static files secured with a bearer token](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala) Future Pekko HTTP +* [Serving static files from a directory](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesNettyServer.scala) Direct Netty +* [Serving static files from a directory, with range requests](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromFilesPekkoServer.scala) Future Pekko HTTP +* [Serving static files from resources](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentFromResourcesPekkoServer.scala) Future Pekko HTTP +* [Serving static files secured with a bearer token](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/static_content/staticContentSecurePekkoServer.scala) Future Pekko HTTP ## Status code -* [Serving static files from a directory](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala) Direct Netty +* [Serving static files from a directory](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/status_code/statusCodeNettyServer.scala) Direct Netty ## Streaming -* [Proxy requests, handling bodies as fs2 streams](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala) cats-effect http4s -* [Respond with an fs2 stream, or with an error, represented as a failed effect in the business logic](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala) cats-effect http4s -* [Stream response as a Pekko stream](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala) Future Pekko HTTP -* [Stream response as a ZIO stream](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala) ZIO Netty -* [Stream response as a ZIO stream](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala) ZIO ZIO HTTP -* [Stream response as an fs2 stream](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala) cats-effect http4s -* [Stream response as an fs2 stream](https://github.com/softwaremill/tapir/tree/master//examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala) cats-effect Netty +* [Proxy requests, handling bodies as fs2 streams](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/ProxyHttp4sFs2Server.scala) cats-effect http4s +* [Respond with an fs2 stream, or with an error, represented as a failed effect in the business logic](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2ServerOrError.scala) cats-effect http4s +* [Stream response as a Pekko stream](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/streamingPekkoServer.scala) Future Pekko HTTP +* [Stream response as a ZIO stream](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyZioServer.scala) ZIO Netty +* [Stream response as a ZIO stream](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingZioHttpServer.scala) ZIO ZIO HTTP +* [Stream response as an fs2 stream](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingHttp4sFs2Server.scala) cats-effect http4s +* [Stream response as an fs2 stream](https://github.com/softwaremill/tapir/tree/master/examples/src/main/scala/sttp/tapir/examples/streaming/StreamingNettyFs2Server.scala) cats-effect Netty ## 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/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 +* [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/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 +* [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 9a35d76dde..73f8d79c4d 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-core" % "1.11.11" ``` 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 857ee483dd..de6b64cee6 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.11" ``` 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.10" exclude("com.typesafe.akka", "akka-stream_2.12") +"com.softwaremill.sttp.tapir" %% "tapir-akka-http-server" % "1.11.11" 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 347b266a14..268c4684b9 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-cats" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-armeria-server-zio" % "1.11.11" ``` to use this interpreter with ZIO. diff --git a/generated-doc/out/server/aws.md b/generated-doc/out/server/aws.md index 7fd0f0739c..fcc92c218b 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-aws-lambda" % "1.11.11" ``` ## 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.10" -"com.softwaremill.sttp.tapir" %% "tapir-aws-terraform" % "1.11.10" -"com.softwaremill.sttp.tapir" %% "tapir-aws-cdk" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-aws-sam" % "1.11.11" +"com.softwaremill.sttp.tapir" %% "tapir-aws-terraform" % "1.11.11" +"com.softwaremill.sttp.tapir" %% "tapir-aws-cdk" % "1.11.11" ``` ### Examples diff --git a/generated-doc/out/server/finatra.md b/generated-doc/out/server/finatra.md index a6442a24f8..d2ff5fd314 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-finatra-server" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-finatra-server-cats" % "1.11.11" ``` and import the object: diff --git a/generated-doc/out/server/http4s.md b/generated-doc/out/server/http4s.md index cd1d2a5208..a9d3f96364 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-server" % "1.11.11" ``` and import the object: diff --git a/generated-doc/out/server/jdkhttp.md b/generated-doc/out/server/jdkhttp.md index 9cc0bb2ce2..5a0de42738 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-jdkhttp-server" % "1.11.11" ``` Then, import the package: diff --git a/generated-doc/out/server/netty.md b/generated-doc/out/server/netty.md index 51fcf0fa89..c27a7ee883 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server" % "1.11.11" // if you want to use Java 21 Loom virtual threads in direct style: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-sync" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-sync" % "1.11.11" // if you are using cats-effect: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-cats" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-cats" % "1.11.11" // if you are using zio: -"com.softwaremill.sttp.tapir" %% "tapir-netty-server-zio" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-netty-server-zio" % "1.11.11" ``` Then, use: diff --git a/generated-doc/out/server/nima.md b/generated-doc/out/server/nima.md index 84fb481625..0e9c70493d 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-nima-server" % "1.11.11" ``` 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 c366dbe13d..4a9ebb7d03 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-prometheus-metrics" % "1.11.11" ``` `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.10" +"com.softwaremill.sttp.tapir" %% "tapir-opentelemetry-metrics" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-datadog-metrics" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-zio-metrics" % "1.11.11" ``` 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 1fd8c1857f..db4462d6bf 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.11" ``` 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.10" exclude("org.apache.pekko", "pekko-stream_2.12") +"com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % "1.11.11" 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 42cafb5cef..7121fdfd9d 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-play29-server" % "1.11.11" ``` and (if you don't already depend on Play) @@ -26,19 +26,19 @@ 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-play-server" % "1.11.11" ``` and (if you don't already depend on Play) ```scala -"org.playframework" %% "play-pekko-http-server" % "3.0.5" +"org.playframework" %% "play-pekko-http-server" % "3.0.6" ``` or ```scala -"org.playframework" %% "play-netty-server" % "3.0.5" +"org.playframework" %% "play-netty-server" % "3.0.6" ``` depending on whether you want to use netty or Pekko based http-server under the hood. diff --git a/generated-doc/out/server/vertx.md b/generated-doc/out/server/vertx.md index 18622d24d0..00190f46b6 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-cats" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-vertx-server-zio" % "1.11.11" ``` 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 63f712042f..61cd58e971 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.11" ``` or just add the zio-http4s integration which already depends on `tapir-zio`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-http4s-server-zio" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-http4s-server-zio" % "1.11.11" ``` 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 2166ffedb6..af5e281c82 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-zio" % "1.11.11" ``` or just add the zio-http integration which already depends on `tapir-zio`: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-zio-http-server" % "1.11.11" ``` 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 d929b3394f..783851f62a 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "tapir-sttp-stub-server" % "1.11.11" ``` 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.10" +"com.softwaremill.sttp.tapir" %% "sttp-mock-server" % "1.11.11" ``` Imports: @@ -265,7 +265,7 @@ result == out To use, add the following dependency: ```scala -"com.softwaremill.sttp.tapir" %% "tapir-testing" % "1.11.10" +"com.softwaremill.sttp.tapir" %% "tapir-testing" % "1.11.11" ``` ### Shadowed endpoints @@ -380,3 +380,90 @@ Results in: result3.toString // res6: String = "Set(Duplicate endpoints names found: e1)" ``` + +## OpenAPI schema compatibility + +The `OpenAPIVerifier` provides utilities for verifying that client and server endpoints are consistent with an OpenAPI specification. This ensures that endpoints defined in your code correspond to those documented in the OpenAPI schema, and vice versa. + +To use the `OpenAPIVerifier`, add the following dependency: + +```scala +"com.softwaremill.sttp.tapir" %% "tapir-openapi-verifier" % "1.11.11" +``` + +The `OpenAPIVerifier` supports two key verification scenarios: + +1. **Server Verification**: Ensures that all endpoints defined in the OpenAPI specification are implemented by the server. +2. **Client Verification**: Ensures that the client implementation matches the OpenAPI specification. + +As a result, you get a list of issues that describe the incomapatibilities, or an empty list, if the endpoints and schema are compatible. + +### Example Usage + +#### Server Endpoint Verification + +```scala +import sttp.tapir.* +import sttp.tapir.docs.openapi.OpenAPIVerifier +import sttp.tapir.json.circe.* + +val clientOpenAPISpecification: String = """ +openapi: 3.0.0 +info: + title: Sample API + version: 1.0.0 +paths: + /users: + get: + summary: Get users + responses: + "200": + description: A list of users + content: + application/json: + schema: + type: array + items: + type: string +""" + +val serverEndpoints = List( + endpoint.get.in("users").out(jsonBody[List[String]]) +) + +val serverIssues = OpenAPIVerifier.verifyServer(serverEndpoints, clientOpenAPISpecification) +``` + +#### Client Endpoint Verification + +```scala +import sttp.tapir.* +import sttp.tapir.docs.openapi.OpenAPIVerifier +import sttp.tapir.json.circe.* + +val serverOpenAPISpecification: String = """ +openapi: 3.0.0 +info: + title: Sample API + version: 1.0.0 +paths: + /users: + get: + summary: Get users + responses: + "200": + description: A list of users + content: + application/json: + schema: + type: array + items: + type: string +""".stripMargin + +val clientEndpoints = List( + endpoint.get.in("users").out(jsonBody[List[String]]) +) + +val clientIssues = OpenAPIVerifier.verifyClient(clientEndpoints, serverOpenAPISpecification) +``` diff --git a/generated-doc/out/tutorials/01_hello_world.md b/generated-doc/out/tutorials/01_hello_world.md index 3697396735..888411d1eb 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 ``` ## 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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 5bf7b31ab3..e6867f5751 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 ``` 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 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 707c521c37..eb51bb6ea6 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 //> 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.11 //> 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 1ff3121aa0..efcc99f7da 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.11 //> 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.11 //> 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-jsoniter-scala:1.11.11 //> 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 a170f77d8c..b87e15e883 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 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 a7ff6f517f..4dbc30145e 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-netty-server-sync:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 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 87838ff513..876b02f65c 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.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-cats:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-cats:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.11 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.11 //> 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.10 -//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.10 -//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.10 +//> using dep com.softwaremill.sttp.tapir::tapir-core:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-http4s-server:1.11.11 +//> using dep com.softwaremill.sttp.tapir::tapir-swagger-ui-bundle:1.11.11 //> using dep org.http4s::http4s-blaze-server:0.23.16 import cats.effect.{ExitCode, IO, IOApp}