Bot releases are visible (Hide)
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
default
key to Schema and openAPI documentation (#824) @esthomwPublished by github-actions[bot] over 3 years ago
Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] almost 4 years ago
_root_
prefix in quasiquotes to ensure macro hygiene (#949) @propensivePublished by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
When migrating to 0.17.x, see the release notes for 0.17.0
Published by github-actions[bot] almost 4 years ago
When migrating to 0.17.x, see the release notes for 0.17.0
Published by github-actions[bot] almost 4 years ago
Endpoint
(and also the last type parameter of ServerEndpoint
) changed from containing the supported stream type or Nothing, to a combination of supported capabilities (which can include: streaming and web sockets support) or
Any`. See https://github.com/softwaremill/sttp/issues/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?
Nothing
with Any
in endpoint typesEndpoint[I, E, O, Source[ByteString, Any]]
, use the capability: Endpoint[I, E, O, AkkaStreams]
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.
Validator
values are no longer looked up as implicit values, but instead should be added to schemas. How to migrate? If you had an implicit
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)) }))
@danilbykov @mszczygiel @tg44 @sbrunk @erikvanoosten @adamw @jan0sch @erikvanoosten @kciesielski @andyczerwonka @CucumisSativus @gaeljw @johnspade @ghostbuster91
(in random order) Thank you!
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!
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago
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.
Published by github-actions[bot] almost 4 years ago
Published by github-actions[bot] almost 4 years ago