Search⌘ K
AI Features

A Pure Implementation Using Tapir

Explore how to implement a pure HTTP API in Scala using the Tapir library. Learn to describe your API with types, generate documentation with Swagger/OpenAPI, and define data schemas for robust server and client code generation.

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
...