Releases: softwaremill/tapir
v0.17.2
When migrating to 0.17.x, see the release notes for 0.17.0
What’s Changed
- Handle responses with the same status code and different media types (#919) @danilbykov
- Fix rendering exclusive bounds in OpenAPI (#898) @JJag
- cleanup some deadcode warnings (#932) @simpadjo
- Update refined to 0.9.20 (#930) @scala-steward
- Cleanup warnings (#928) @simpadjo
- Fix some warnings (#921) @simpadjo
- Add "-Ywarn-macros:after" option (#925) @simpadjo
- Update play-json to 2.9.2 (#926) @scala-steward
- Update http4s-blaze-server, http4s-circe, ... to 0.21.15 (#916) @scala-steward
- Update discipline-scalatest to 2.1.1 (#912) @scala-steward
- Update mdoc, sbt-mdoc to 2.2.14 (#910) @scala-steward
- Update cats-effect to 2.3.1 (#914) @scala-steward
- Update shared:akka, shared:core, shared:fs2, ... to 1.0.0-RC11 (#902) @scala-steward
- Update client3:akka-http-backend, ... to 3.0.0-RC13 (#900) @scala-steward
- Update swagger-ui to 3.38.0 (#913) @scala-steward
- Update cats-core, cats-effect, cats-laws to 2.3.1 (#911) @scala-steward
- Update scalacheck to 1.15.2 (#909) @scala-steward
- Update http4s-blaze-server, http4s-circe, ... to 0.21.14 (#908) @scala-steward
- Update scala-java-time, ... to 2.1.0 (#907) @scala-steward
- Update refined to 0.9.19 (#906) @scala-steward
- Update play, play-akka-http-server, ... to 2.8.7 (#905) @scala-steward
- Update akka-http to 10.2.2 (#904) @scala-steward
- Update finatra-http, inject-app, ... to 20.12.0 (#903) @scala-steward
- Update model:core to 1.2.0-RC9 (#901) @scala-steward
- Update sbt-projectmatrix to 0.7.0 (#899) @scala-steward
v0.17.1
When migrating to 0.17.x, see the release notes for 0.17.0
What’s Changed
- Fixes #893: access to the underlying request via ServerRequest (#895) @adamw
- Closes #889: explicit interpreters instead of extension methods (#894) @adamw
- Fixes #890: Accept authorization type in lower case (#892) @adamw
- JSON specific decode errors (#877) @markarasev
- Allow to specify name of security scheme in api docs (#888) @mszczygiel
v0.17.0
Breaking changes
- Compatibility with sttp3. The 4th type parameter of
Endpoint
(and also the last type parameter ofServerEndpoint
) changed from containing the supported stream type orNothing, to a combination of supported capabilities (which can include: streaming and web sockets support) or
Any`. See softwaremill/sttp#610 for more information on the design of the capabilities system. This means that the type of the default endpoint is now:
val endpoint: Endpoint[Unit, Unit, Unit, Any]
-
instead of
Endpoint[Unit, Unit, Unit, Nothing]
. How to migrate?- replace usages of
Nothing
withAny
in endpoint types - instead stream types, e.g.
Endpoint[I, E, O, Source[ByteString, Any]]
, use the capability:Endpoint[I, E, O, AkkaStreams]
- replace usages of
-
the signature of
streamBody
changed slightly. The first parameter now needs to be the companion object for the stream capability (e.g.AkkaStreams
,Fs2Streams
,ZioStreams
). -
Schema
derivation is configurable, either automatic derivation (which was the default before) or semi-automatic derivation can be used. See the docs. How to migrate? Add an explicit import:
import sttp.tapir.generic.auto._
in the source files where an implicit Schema
can no longer be found. You can also use the SchemaDerivation
mixin.
- Validators are now part of schemas.
Validator
values are no longer looked up as implicit values, but instead should be added to schemas. How to migrate? If you had animplicit
validator instance for a custom type, you'll need to modify the schema to add it; take a look at schema customisation in the docs to see how to customise derived schemas. For example:
implicit def schemaForColor: Schema[Color] = Schema.string
.validate(Validator.enum(List(Blue, Red), { c => Some(plainCodecForColor.encode(c)) }))
New features
- client interpreter for Scala.JS
- web sockets
- play client interpreter
- endpoints from annotations
- configurable coproduct schema derivation
- sbt codegen plugin
Credits
@danilbykov @mszczygiel @tg44 @sbrunk @erikvanoosten @adamw @jan0sch @erikvanoosten @kciesielski @andyczerwonka @CucumisSativus @gaeljw @johnspade @ghostbuster91
(in random order) Thank you!
What next?
Vote on the issue you'd like to see resolved (yes, we're looking at the 👍 that you are leaving there :) ).
And more generally ... let us know where you'd like to see Scala headed in the Scala developer survey - thanks!
v0.17.0-M11
What’s Changed
- Openapi codegen improvements - docs and sbt oprions (#879) @tg44
- Add Scala.js support to sttp client (#860) @sbrunk
- Update sbt-scalajs, scalajs-compiler, ... to 1.3.1 (#858) @scala-steward
- Update refined to 0.9.18 (#857) @scala-steward
- Allow swagger-ui to run on a non-root context-path. Solves #694. (#865) @erikvanoosten
- Annotations for endpoint inputs (#832) @danilbykov
- Update cats-effect to 2.3.0 (#873) @scala-steward
- Update discipline-scalatest to 2.1.0 (#856) @scala-steward
- Update cats-core, cats-laws to 2.3.0 (#871) @scala-steward
- Update http4s-blaze-server, http4s-dsl to 0.21.13 (#870) @scala-steward
- Update mdoc, sbt-mdoc to 2.2.13 (#869) @scala-steward
- Update client3:akka-http-backend, ... to 3.0.0-RC10 (#867) @scala-steward
- Remove travis, use gh actions only (#866) @adamw
- Add notice regarding authentication headers. (#847) @jan0sch
- Update swagger-ui to 3.37.0 (#862) @scala-steward
v0.17.0-M10
What’s Changed
- Update sbt-scalajs, scalajs-compiler, ... to 1.3.1 (#858) @scala-steward
- Update refined to 0.9.18 (#857) @scala-steward
- Allow swagger-ui to run on a non-root context-path. Solves #694. (#865) @erikvanoosten
- Annotations for endpoint inputs (#832) @danilbykov
- Update cats-effect to 2.3.0 (#873) @scala-steward
- Update discipline-scalatest to 2.1.0 (#856) @scala-steward
- Update cats-core, cats-laws to 2.3.0 (#871) @scala-steward
- Update http4s-blaze-server, http4s-dsl to 0.21.13 (#870) @scala-steward
- Update mdoc, sbt-mdoc to 2.2.13 (#869) @scala-steward
- Update client3:akka-http-backend, ... to 3.0.0-RC10 (#867) @scala-steward
- Remove travis, use gh actions only (#866) @adamw
- Add notice regarding authentication headers. (#847) @jan0sch
- Update swagger-ui to 3.37.0 (#862) @scala-steward
v0.17.0-M9
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.
v0.17.0-M8
v0.17.0-M7
v0.17.0-M6
What’s Changed
- Update sbt-mima-plugin to 0.8.1 (#800) @scala-steward
- sbt-openapi-codegen minimal working implementation (#810) @tg44
- Update catbird-effect, catbird-finagle to 20.10.0 (#819) @scala-steward
- Update swagger-ui to 3.36.1 (#820) @scala-steward
- Update finatra-http, inject-app, ... to 20.10.0 (#818) @scala-steward
- Update client3:akka-http-backend, ... to 3.0.0-RC7 (#817) @scala-steward
- Update swagger-ui to 3.36.0 (#816) @scala-steward
- ADR: Codecs and schemas derivation configs (#813) @ghostbuster91
- Update play, play-akka-http-server, ... to 2.8.3 (#814) @scala-steward
v0.17.0-M5
What’s Changed
- Update client3:akka-http-backend, ... to 3.0.0-RC6 (#811) @scala-steward
- Update shared:akka, shared:core, shared:fs2, ... to 1.0.0-RC7 (#809) @scala-steward
- Update model:core to 1.2.0-RC5 (#808) @scala-steward