Releases: softwaremill/tapir
v0.20.0-M6
What’s Changed
- New annotations (#1767) @kubinio123
- Consistent naming of client interpreter methods, fixing docs (#1775) @adamw
- require value class parameters list to not be empty (#1774) @kubinio123
- Add nullable when describing Option in OpenApi schema (#1716) @rwiskerke
- added copying format field in value class Schema derivation (#1763) @kubinio123
- added type name for api key auth as parameter (#1760) @kubinio123
- Fix artifact name for tapir-zio-http-server dependency (#1761) @williamhaw
Breaking changes
toRequestUnsafe
in http4s and play client interpreters have been renamed totoRequestThrowDecodeFailures
Dependency updates
- Update scalafmt-core to 3.3.2 (#1773) @scala-steward
- Update aws-lambda-java-runtime-interface-client to 2.1.0 (#1772) @scala-steward
- Update swagger-ui to 4.2.1 (#1769) @scala-steward
- Update vertx-web to 4.2.4 (#1768) @scala-steward
- Update tethys-core, tethys-derivation, ... to 0.26.0 (#1762) @scala-steward
- Update jsoniter-scala-core, ... to 2.12.1 (#1759) @scala-steward
- Update finatra-http-server, inject-app, ... to 22.1.0 (#1758) @scala-steward
v0.20.0-M5
What’s Changed
- Resolve name clashes when using a macro to derive inputs using annotations (#1755) @adamw
- Swap constructor/method parameter in ServerInterpreter so that it can be created once for a given list of endpoints (#1754) @adamw
- oneOfBody input/output (#1739) @adamw
- Scala 2.13 partial unification comment (#1747) @nebasuke
- added mapping required property for object based on input codec (#1750) @kubinio123
- Nested descritpions fix (#1624) @Pask423
- fixed mapSecurityInTo (#1745) @kubinio123
Dependency updates
- Update model:core to 1.4.22 (#1751) @scala-steward
- Update scala-library, scala-reflect to 2.13.8 (#1753) @scala-steward
- Update inject-app, inject-core, ... to 21.9.0 (#1515) @scala-steward
- Update swagger-ui to 4.1.3-1 (#1749) @scala-steward
- Update model:core to 1.4.21 (#1748) @scala-steward
- Update play, play-akka-http-server, ... to 2.8.13 (#1743) @scala-steward
- Update netty-all to 4.1.73.Final (#1744) @scala-steward
- Update cats-effect to 3.3.4 (#1736) @scala-steward
- Update upickle to 1.4.4 (#1735) @scala-steward
v0.20.0-M4
What’s Changed
- Better errors messages for multipart requests (#1728) @adamw
- Removing http4s-blaze-server as a direct dependency. (#1727) @msosnicki
- Easier construction of part codecs (#1725) @adamw
- Play Server: don't fail on unknown part in multipart body (#1704) @vdebergue
- Update zio-http (#1686) @adamw
- Better naming & docs for SwaggerInterpreter parameters (#1703) @adamw
Dependency updates
- Update derevo-core to 0.13.0 (#1733) @scala-steward
- Update jawn-parser to 1.3.2 (#1732) @scala-steward
- Update play-ahc-ws-standalone to 2.1.7 (#1730) @scala-steward
- Update play, play-akka-http-server, ... to 2.8.12 (#1729) @scala-steward
- Update scalafmt-core to 3.3.1 (#1724) @scala-steward
- Update logback-classic, logback-core to 1.2.10 (#1705) @scala-steward
- Update scalafmt-core to 3.2.2 (#1712) @scala-steward
- Update cats-effect to 3.3.3 (#1723) @scala-steward
- Update scalajs-dom to 2.1.0 (#1722) @scala-steward
- Update shared:akka, shared:core, shared:fs2, ... to 1.3.1 (#1720) @scala-steward
- Update cats-effect to 3.3.2 (#1721) @scala-steward
- Update simpleclient_common to 0.14.1 (#1710) @scala-steward
- Update magnolia to 1.0.0 (#1706) @scala-steward
- Update model:core to 1.4.20 (#1707) @scala-steward
- Update akka-stream to 2.6.18 (#1708) @scala-steward
- Update vertx-web to 4.2.3 (#1711) @scala-steward
v0.20.0-M3
What’s Changed
- Add a way to add (encoded) examples for streaming bodies (#1702) @adamw
- Allow customisation of the generated OpenAPI model when exposing swagger ui (#1700) @adamw
- Modify the index.html for Swagger UI so that it references the docs yaml directly (#1697) @adamw
- Update magnolia to softwaremill's version (#1696) @adamw
Dependency updates
- Update simpleclient_common to 0.13.0 (#1682) @scala-steward
- Update scala-library, scala-reflect to 2.13.7 (#1571) @scala-steward
- Update shared:akka, shared:core, shared:fs2, ... to 1.3.0 (#1691) @scala-steward
v0.20.0-M2
0.20.0-M1 wasn't published due to problems with the release process.
Breaking changes
- optional parts in a multipart codec are now represented as a
Option[Part[T]]
, instead of anPart[Option[T]]
What’s Changed
- Point to softwaremill/magnolia (#1688) @oschrenk
- Match path exactly even if the path is only specified in the security inputs (#1689) @adamw
- Disable coursier for netty dependencies (#1680) @adamw
- Allow stub sttp server to interpret request body (#1671) @soujiro32167
- Remove the requirement in DefaultServerLog for a MonadError, pass a "no log" value instead (#1665) @adamw
- Added ability to map error types with zio (#1662) @soujiro32167
- Rename DecodeSuccessContext parameters (#1661) @ex0ns
- Add attributes to endpoint / endpoint io (#1646) @adamw
- MultipartCodec changes (#1617) @micossow
Dependency updates
- Update logback-classic, logback-core to 1.2.9 (#1690) @scala-steward
- Update zio, zio-streams, zio-test, ... to 1.0.13 (#1685) @scala-steward
- Update logback-classic, logback-core to 1.2.8 (#1684) @scala-steward
- Update vertx-web to 4.2.2 (#1683) @scala-steward
- Update netty-all to 4.1.72.Final (#1681) @scala-steward
- Update scalafmt-core to 3.2.1 (#1664) @scala-steward
- Update upickle to 1.4.3 (#1678) @scala-steward
- Update sbt-scalajs, scalajs-compiler, ... to 1.8.0 (#1676) @scala-steward
- Update swagger-ui to 4.1.3 (#1677) @scala-steward
- Update http4s-blaze-client, ... to 0.23.7 (#1673) @scala-steward
v0.19.3
v0.19.1
What’s Changed
- Fix handling of mixed security and normal paths (#1655) @adamw
- Don't depend on zio-interop-cats in tapir-zio-http-server (#1641) @ghostdogpr
- Fix parentheses (#1639) @fdietze
- Add SwaggerUI.basePath (#1618) @micossow
- Default content type tests (#1632) @micossow
- added zio-json to supported backends (#1628) @nmcb
Dependency updates
- Update play-ahc-ws-standalone to 2.1.6 (#1657) @scala-steward
- Update client3:akka-http-backend, ... to 3.3.18 (#1653) @scala-steward
- Update play-ahc-ws-standalone to 2.1.5 (#1651) @scala-steward
- Update swagger-ui to 4.1.2 (#1650) @scala-steward
- Update scalafmt-core to 3.2.0 (#1649) @scala-steward
- Update refined to 0.9.28 (#1648) @scala-steward
- Update play-ahc-ws-standalone to 2.1.4 (#1647) @scala-steward
- Update cats-effect to 3.3.0 (#1644) @scala-steward
- Update zio-json to 0.2.0-M3 (#1642) @scala-steward
- Update cats-core, cats-laws to 2.7.0 (#1643) @scala-steward
- Update opentelemetry-api, ... to 1.9.1 (#1638) @scala-steward
- Update zio-interop-cats to 3.2.9.0 (#1634) @scala-steward
- Update scalafmt-core to 3.1.2 (#1633) @scala-steward
- Update client3:akka-http-backend, ... to 3.3.17 (#1631) @scala-steward
- Update derevo-core to 0.12.8 (#1630) @scala-steward
- Update jsoniter-scala-core, ... to 2.12.0 (#1629) @scala-steward
- Update tagging to 2.3.2 (#1627) @scala-steward
v0.19.0
New features
Security
This release focus on security improvements, most notably extending Endpoint
with an additional type parameter A
for security inputs. In case security endpoints are defined, the security logic has to be provided first, followed by the server logic. Moreover, error outputs can be extended for partial endpoints by adding new error output variants.
More information on the change:
- security and server logic documentation
- ADR on the security refactoring
- Auth / security enhancements GH issue
Other
- cats-effect 3 & http4s 0.23 support; cats-effect 2 support is dropped
- static file serving support
- Netty server interpreter
- more flexible
oneOf
outputs, which now allow arbitrary outputs, without the need to provide a status code .errorOutVariant
for extending error outputs with new variants- endpoints with authentication can be hidden by returning a 404 instead of a 401 when an alternate
DecodeFailureHandler
is used
Migrating from previous versions
- replace any occurrence of the
Endpoint
type withPublicEndpoint
- replace
ServerEndpoint[I, E, O, R, F]
withServerEndpoint[R, F]
(e.g.ServerEndpointp[Any, Future]
), or withServerEndpoint.Full[Unit, Unit, I, E, O, R, F]
if you need to preserve the types of inputs/outputs - replace any calls to server interpreter which provided the endpoint and server logic separately, with a call to one of the
.serverLogic
variants. For example,AkkaHttpServerInterpreter().toRoute(helloWorld)(name => Future.successful(Right(s"Hello, $name!")))
should be replaced withAkkaHttpServerInterpreter().toRoute(helloWorld.serverLogicSuccess(name => Future.successful(s"Hello, $name!")))
.
This should make the code compile using the new version. The next step would be to move security-related inputs from .in
to .securityIn
when defining the endpoint, and taking advantage of the security improvements (e.g. separate security and server logic).
Other breaking changes
- server interpreters accept only
ServerEndpoint
s. Replace.toRoute(endpoint)(logic)
with.toRoute(endpoint.serverLogic(logic))
serverLogicInfallible
is renamed toserverLogicSuccess
ServerLog
implementations has an extended interface - the whole request is now available- there's are single swagger & redoc modules, see OpenAPI docs
- specifying custom interceptors is unified across all server interpreters. Previous usages of
[Interpreter]ServerOptions.customInterceptors(...)
should be replaced with.customInterceptors.[builderMethods]().options
ZEndpoint
is removed,ZServerEndpoint
is extended with capabilities- a
405
is returned if multiple endpoints are being interpreted as a server, the request matches the path of some endpoint but not the method
Deprecations
oneOfMapping
is renamed tooneOfVariant
Towards a stable release
The current plan is to have two more cycles before a stable release: 0.20 and then 1.0, both with a milestone/RC phase.
A stable 1.0 release will mean that core
should not change until the next version in a binary-incompatible way - we have MiMA for that already set up. Other integration modules won't have this requirement as they depend on the integrations, so it would be hard to make any promises.
Hence - vote for the issues that you'd like fixed/implemented first and foremost, and let us know if you'd see any needs for breaking changes in core
!
Changes since 0.19.0-M16
- Mapping over errors in partial server endpoints (#1623) @adamw
- Properly handle decode failures of both regular & security inputs (#1622) @adamw
- use
addSegment
instead ofaddPath
for http4s (#1621) @yurique - Improve how error output variants are defined: fix ordering, provide a method which allows arbitrary ordering (#1620) @adamw
- Enables hiding endpoints with auth inputs if any inputs fails to decode (#1615) @adamw
- ServerLog refactoring (#1598) @micossow
- Improve refined integration for constraint on string size (#1613) @strokyl
- Add swagger and redoc bundles, which allow interpreting and exposing docs in a single step (#1611) @adamw
- Encode possible values when reporting an enumeraton error in the DefaultDecodeFailureHandler (#1608) @adamw
- Add endpoint as a parameter to the OpenAPIDocsOptions (#1609) @adamw
- Rename httpMethod to method and move to EndpointMetaOps (#1607) @adamw
- Header values in Codec, codec naming cleanup (#1606) @adamw
- Fix http4s WebSocket headers (#1601) @ghostdogpr
Dependency updates since 0.19.0-M16
- Update jawn-parser to 1.3.0 (#1614) @scala-steward
- Update scalafmt-core to 3.1.1 (#1612) @scala-steward
- Update derevo-core to 0.12.7 (#1610) @scala-steward
- Update opentelemetry-api, ... to 1.9.0 (#1605) @scala-steward
- Update logback-classic, logback-core to 1.2.7 (#1604) @scala-steward
v0.19.0-M16
Breaking changes
- See the release notes for 0.19.0-M14
oneOfMapping
is renamed tooneOfVariant
(mostly with deprecations)
What’s Changed
- Add .errorOutVariant, rename oneOfMapping to oneOfVariant (#1600) @adamw
- ({files,resources}Endpoint => {files,resources}GetEndpoint) (#1597) @rssh
- fixed names of recently changed methods in comments. (#1596) @rssh
- Omit boundary when decoding fixed content-type header (#1591) @micossow
- Fix OpenApi path encoding (#1588) @micossow
- Add WebSocket support for Play (#1585) @ghostdogpr
- Support ZIO in sttp websocket client (#1586) @ghostdogpr
- Upgrade http4s to 0.23.6 (#1579) @micossow
- Apply scalafmt (#1587) @micossow
- Adjust behavior on decode failure to native zio HttpApps (#1568) @soujiro32167
- Fixed typo (#1589) @jetjager
- Set content type header in Part when using PlayServerInterpreter (#1584) @ghostdogpr
Dependency updates
- Update zio-json to 0.2.0-M2 (#1599) @scala-steward
- Update scalafmt-core to 3.1.0 (#1592) @scala-steward
- Update swagger-ui to 4.1.0 (#1594) @scala-steward
- Update jsoniter-scala-core, ... to 2.11.1 (#1557) @scala-steward
- Update opentelemetry-api, ... to 1.7.1 (#1575) @scala-steward
- Update scalafmt-core to 3.0.8 (#1563) @scala-steward
v0.19.0-M14
Breaking changes
This release brings some security improvements, most notably extending Endpoint
with an additional type parameter A
for security inputs.
More information on the change:
- security and server logic documentation
- ADR on the security refactoring
- Auth / security enhancements GH issue
Migrating from previous versions:
- replace any occurrence of the
Endpoint
type withPublicEndpoint
- replace
ServerEndpoint[I, E, O, R, F]
withServerEndpoint[R, F]
(e.g.ServerEndpointp[Any, Future]
), or withServerEndpoint.Full[Unit, Unit, I, E, O, R, F]
if you need to preserve the types of inputs/outputs - replace any calls to server interpreter which provided the endpoint and server logic separately, with a call to one of the
.serverLogic
variants. For example,AkkaHttpServerInterpreter().toRoute(helloWorld)(name => Future.successful(Right(s"Hello, $name!")))
should be replaced withAkkaHttpServerInterpreter().toRoute(helloWorld.serverLogicSuccess(name => Future.successful(s"Hello, $name!")))
.
This should make the code compile using the new version. The next step would be to move security-related inputs from .in
to .securityIn
when defining the endpoint, and taking advantage of the security improvements (e.g. separate security and server logic).
What’s Changed
- Security improvements: dedicated security input in Endpoint (#1560) @adamw
- Document how to use Part[Option[T]] in multipartBody (#1555) @micossow
- Support for AWS Lambda with Scala.js (#1562) @micossow
- Http4sClientInterpreter should consume http4s.Uri instead of raw string (#1569) @ghostbuster91
- Add new validators (#1567) @geirolz
- Minor clarification in openAPI docs (#1558) @ghost
- Test to verify invulnerability to CVE-2021-41084 (#1508) @micossow
- Fix links to the schemas derivation (#1556) @danicheg
- Gzip file handling (#1542) @ghost
- Enable more modules for scala 3 (#1553) @adamw
Dependency updates
- Update sbt-projectmatrix to 0.9.0 (#1580) @scala-steward
- Update swagger-ui to 4.0.1 (#1578) @scala-steward
- Update model:core to 1.4.18 (#1577) @scala-steward
- Update vertx-web to 4.2.1 (#1574) @scala-steward
- Update akka-http to 10.2.7 (#1572) @scala-steward
- Update vertx-web to 4.2.0 (#1559) @scala-steward
- Update jsoniter-scala-core, ... to 2.11.0 (#1552) @scala-steward