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