github softwaremill/tapir v0.18.0-M1

latest releases: v1.11.9, v1.11.8, v1.11.7...
3 years ago

Summary

The main features in this release:

  • content negotiation support on server & client side
  • data structure is reflected only in schemas, not in validators. Validators are much simpler now
  • server interpreters are rewritten, and support two types of interceptors (request & endpoint interceptors). Some functionalities (logging, decode failure handling) are implemented as interceptors
  • exceptions are handled and result in the 500 status code

Breaking changes

  • DecodeFailureHandler - minor changes in method signatures, the default one is now DefaultDecodeFailureHandler.handler
  • LogRequestHandling -> ServerLog
  • server options have been significantly refactored. To create custom options, use e.g. AkkaServerOptions.customInterceptors
  • there's no single streamBody method, instead there are streamBinaryBody, streamTextBody, streamListBody, streamIterableBody
  • SchemaTypes are not objects, but classes. If you specified the schema type manually, instead of e.g. SchemaType.SString you'll have to use SchemaType.SString()
  • rewritten SchemaType.[SProduct|SCoproduct|SOpenProduct]
  • Codec is no longer a Mapping
  • Validator.enum -> Validator.derivedEnum
  • akka server interpreter: removal of .toDirective
  • play server interpreter: toRoute -> toRoutes
  • deprecated statusMapping in favor of oneOfMapping

What’s Changed

Dependency updates

Don't miss a new tapir release

NewReleases is sending notifications on new releases.