Why it matters

Tapir eliminates API duplication. Understanding shapes API-first Scala.

Advertisement

The architecture

Endpoint description: inputs + outputs + errors + metadata.

Interpreters: server, client, docs.

Tapir approachEndpoint descas dataServer + clientgeneratedOpenAPI docsgeneratedSingle source of truth: endpoint description drives everything
Tapir pipeline.
Advertisement

How it works end to end

Server interpreters: http4s, Akka HTTP, Pekko HTTP, Play, Netty.

Client: sttp or STTP-based.

Docs: OpenAPI + AsyncAPI.

Validation: type-driven.