tapir, or Typed API descRiptions¶
With tapir, you can describe HTTP API endpoints as immutable Scala values. Each endpoint can contain a number of input parameters, error-output parameters, and normal-output parameters. An endpoint specification can be interpreted as:
- a server, given the “business logic”: a function, which computes output parameters based on input parameters. Currently supported:
- a client, which is a function from input parameters to output parameters. Currently supported:
- documentation. Currently supported:
Tapir is licensed under Apache2, the source code is available on GitHub.
Depending on how you prefer to explore the library, take a look at one of the examples or read on for a more detailed description of how tapir works!
Tapir is available for Scala 2.12 and 2.13 on the JVM. The client interpreter is also available for Scala.JS.
Other sttp projects¶
sttp is a family of Scala HTTP-related projects, and currently includes:
- sttp client: the Scala HTTP client you always wanted!
- sttp tapir: this project
- sttp model: simple HTTP model classes (used by client & tapir)
Development and maintenance of sttp tapir is sponsored by SoftwareMill, a software development and consulting company. We help clients scale their business through software. Our areas of expertise include backends, distributed systems, blockchain, machine learning and data analytics.
Table of contents¶
- Status codes
- Custom types
- Working with JSON
- Streaming support
- Web sockets
- Datatypes integrations
- ZIO integration
- Running as an akka-http server
- Running as an http4s server
- Running as a Finatra server
- Running as a Play server
- Running as a Vert.X server
- Server options
- Server logic
- Error handling