A Pure Implementation Using Tapir

Using types to describe an API

Describing your API using types is not bleeding edge academic research stuff like you might have guessed. There are several libraries existing for it!

Some of these are endpoints, rho included in http4s, and tapir. We will be using tapir in our implementation.

Why did we pick the tapir library?

  • We wanted to use something that allows us to generate a http4s server. This already narrowed down the options a bit.
  • It should be able to generate API documentation, which nowadays means Swagger/OpenAPI support.
  • It should support not only http4s but more options as well.

Tapir meets all our requirements. The library is still pretty young and may be subject to breaking changes, so please keep this in mind when reading through the following part.

Get hands-on with 1200+ tech skills courses.