Bot releases are hidden (Show)
Published by adamw almost 4 years ago
Auto/semi auto derivation: Validator
and Schema
derivations are now configurable. In order make your code compile as it was before, you need to add an explicit import:
import sttp.tapir.generic.auto._
or separately:
import sttp.tapir.generic.schema._
import sttp.tapir.generic.validator._
You can also use ValidatorDerivation
and SchemaDerivation
mixins. See https://tapir.softwaremill.com/en/latest/endpoint/customtypes.html#schema-derivation for more details.
There's also a ScalaFix migration available: https://github.com/xela85/TapirGenericAutoMigration.
There's a couple of breaking changes in this release. Some background information can be found here: https://blog.softwaremill.com/tapir-codecs-get-an-update-c9801889cbf3
A non-comprehensive summary of the breaking changes:
Codec[H, CF, L]
becomes Codec[L, H, CF]
CodecForMany
and CodecForOptional
is removed. Instead, use Codec[List[...], ...]
or Codec[Option[...], ...]
List
replaced some usages of Seq
, in the types to which endpoint inputs/outputs mappedanyJsonBody
SwaggerHttp4s.routes: HttpRoutes
now returns routes that include the given contextPath
. Hence, when before to expose the routes you had to do Router("/docs" -> new SwaggerHttp4s(yaml).routes[IO])
, now it's:Router("/" -> new SwaggerHttp4s(yaml).routes[IO])
See #319
Published by adamw almost 5 years ago
com.softwaremill.tapir
to com.softwaremill.sttp.tapir
(organization)tapir
to sttp.tapir
(see sttp-client/#288)Codec
s are parametrised with a CodecFormat
, instead of a MediaType
(however, codec format still includes a media type)SchemaFor[T]
into Schema[T]
. Previous Schema
datatype now is SchemaType
(#247)And some minor changes :)