Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Playing with tapirs Scala Vienna UserGroup

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Playing with tapirs Scala Vienna UserGroup

A presentation about the tapir library from softwaremill

Avatar for Michele Vigilante

Michele Vigilante

November 21, 2019
Tweet

Other Decks in Programming

Transcript

  1. Agenda • Conventional API definitions • What is tapir •

    Why tapir • Inputs and Outputs • Capabilities • Live Demo - Customer Application
  2. Conventional Endpoint definitions • Routes file ◦ No type safety

    ◦ Difficult to maintain • Spring annotations ◦ limited type safety ◦ **magic**
  3. What is Tapir? • tapir -> Typed API descRiptions •

    created by Adam Warski from Softwaremill • define HTTP endpoints as Scala values • gain for free via interpretation ◦ [framework] Route ◦ OpenAPI documentation ◦ sttp API client
  4. Supported frameworks • akka-http • finatra • http4s • playframework

    (Soon™) • BYOI -> bring your own interpreter
  5. Why tapir • Full type safety • No magic, just

    simple code • framework agnostic • free server, client and docs • very “ergonomic”
  6. Capabilities • Custom Types (provided Codec) • Input/Output validation •

    Authentication -> bearer token / basic / OAuth2 • Payload -> JSON / URL-encoded Forms / Multipart Forms etc. • Streaming
  7. Q & A Thanks for your attention! • Links ◦

    https://www.firstbird.com/en/ ◦ https://tapir-scala.readthedocs.io/en/latest/index.html ◦ https://github.com/softwaremill/tapir ◦ https://github.com/zZKato/tapir-live-demo-scala-usergroup