Migrating
From 0.20 to 1.0
EndpointVerifier
is moved to a separatetapir-testing
modulecustomJsonBody
is renamed tocustomCodecJsonBody
anyFromStringBody
is renamed tostringBodyAnyFormat
anyFromUtf8StringBody
is renamed tostringBodyUtf8AnyFormat
CustomInterceptors
is renamed toCustomiseInterceptors
as this better reflects the functionality of the classCustomiseInterceptors.errorOutput
is renamed to.defaultHandlers
, with additional options added.in custom server interpreters, the
RejectInterecptor
must be now disabled explicitly usingRejectInterceptor.disableWhenSingleEndpoint
when a single endpoint is being interpreted; theServerInterpreter
no longer knows about all endpoints, as it is now parametrised with a function which gives the potentially matching endpoints, given aServerRequest
the names of Prometheus and OpenTelemetry metrics have changed; there are now three metrics (requests active, total and duration), instead of the previous 4 (requests active, total, response total and duration). Moreover, the request duration metric includes an additional label - phase (either headers or body), measuring how long it takes to create the headers or the body.
CustomiseInterceptors.appendInterceptor
is replaced with.addInterceptor
;.prependInterceptor
and.appendInterceptor
methods are also addedRequestHandler
, returned byRequestInterceptor
, now also accepts a list of server endpoints. This allows to dynamically filter the endpoints. Moreover, there’s a new type parameter inRequestInterceptor
andRequestHandler
,R
, specifying the capabilities required by the given server endpoints.the http4s server interpreters have only one effect parameter, instead of two (
F
for the general effect andG
for the body effect). This separation stopped making sense with the introduction ofBodyListener
some time ago and keepingServerInterpreter
using a single effect.the Swagger and Redoc UIs by default use relative paths for yaml/json documentation references and for redirects. This can be changed by passing appropriate options.
The
streamBinaryBody
method now has a mandatoryformat
parameter, which previously was fixed to beCodecFormat.OctetStream()
Moved traits, classes, objects
server interpreters & interceptors have moved from
core
into theserver/core
moduleServerResponse
andValuedEndpointOutput
are moved tosttp.tapir.server.model
metrics classes and interceptors have moved to the
sttp.tapir.server.metrics
packageEndpoint.renderPathTemplate
is renamed toEndpoint.showPathTemplate
web socket exceptions
UnsupportedWebSocketFrameException
andWebSocketFrameDecodeFailure
are now in thesttp.tapir.model
packageOpenAPI and AsyncAPI models are now part of a separate sttp-apispec project, hence the packages of these objects changed as well, from
sttp.tapir.apispec
/sttp.tapir.openapi
/sttp.tapir.asyncapi
tosttp.tapir.apispec.(...)
server interpreters sources are now grouped based on the underlying server implementation (e.g. http4s, vertx), and then sub-directories contain effect integrations (e.g. cats, zio). Name templates:
for artifacts:
tapir-<server>-server-<effect>
. E.g.tapir-zio-http4s-server
becametapir-http4s-server-zio1
for package names:
sttp.tapir.server.<server>.<effect>
for interpreters:
<server><effect>ServerInterpreter
From 0.19 to 0.20
See the release notes
From 0.18 to 0.19
See the release notes
From 0.17 to 0.18
See the release notes