New Loom-based backends
Backends based on Loom (Java virtual threads) have been migrated from the tapir-loom project, and are now a part of the main distribution. They require JDK 21. Read more:
Breaking changes
DecodeFailureHandler
DecodeFailureHandler
has become DecodeFailureHandler[F]
to allow effectful error handling. If you're using custom handlers, update them to the new apply
signature:
trait DecodeFailureHandler[F[_]] {
def apply(ctx: DecodeFailureContext)(implicit monad: MonadError[F]): F[Option[ValuedEndpointOutput[_]]]
}
RejectHandler
RejectHandler.apply
no longer takes a Failure
, but a RejectContext
, which encapsulates the failure, and the ServerRequest
as well, allowing using more information for your rejection handling.
trait RejectHandler[F[_]] {
def apply(ctx: RejectContext)(implicit monad: MonadError[F]): F[Option[ValuedEndpointOutput[_]]]
}
Full changelog
- [bugfix] Fix blocking implementation for CatsMonadAsyncError (#3309) @kciesielski
- Add RejectContext to RejectHandler. (#3285) @Grryum
- [tests] Implement serverWithStop in all test interpreters (#3306) @kciesielski
- Add type parameter F[_] to DecodeFailureHandler. (#3281) @Grryum
- Migrate servers from tapir-loom (#3304) @kciesielski
- Fix zio-interop-reactivestreams dependency (#3303) @kciesielski
- Support graceful shutdown in Netty server (#3294) @kciesielski
- syntactic sugar: add Codec.mapEither (#3299) @jnicoulaud-ledger
- feat: Update Iron to v2.3.0 (#3298) @Iltotore
Dependency updates
- Update client3:akka-http-backend, ... to 3.9.1 (#3308) @softwaremill-ci
- Update armeria to 1.26.2 (#3307) @softwaremill-ci
- Update iron to 2.3.0 (#3293) @softwaremill-ci
- Update mdoc, sbt-mdoc to 2.5.0 (#3305) @softwaremill-ci
- Update zio, zio-streams, zio-test, ... to 2.0.19 (#3302) @softwaremill-ci
- Update fs2-reactive-streams to 3.9.3 (#3301) @softwaremill-ci
- Update finatra-http-server, inject-app, ... to 23.11.0 (#3295) @softwaremill-ci
- Update play-json to 3.0.1 (#3300) @softwaremill-ci