tapir

Declarative, type-safe web endpoints library

APACHE-2.0 License

Stars
1.3K
Committers
297

Bot releases are hidden (Show)

tapir - v0.17.0-M9

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.

tapir -

Published by adamw over 4 years ago

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 mapped
  • if you are using custom (implicit) json codecs, for json bodies you should use anyJsonBody
tapir -

Published by adamw almost 5 years ago

Breaking changes

  • the 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

tapir - sttp tapir v0.12.0

Published by adamw almost 5 years ago

Major changes

  • renamed the group id from com.softwaremill.tapir to com.softwaremill.sttp.tapir (organization)
  • renamed the main package from tapir to sttp.tapir (see sttp-client/#288)
  • Codecs are parametrised with a CodecFormat, instead of a MediaType (however, codec format still includes a media type)
  • using sttp model (which is shared with sttp client)
  • changed SchemaFor[T] into Schema[T]. Previous Schema datatype now is SchemaType (#247)

And some minor changes :)