Elevate and Conquer, Unleashing the Power of High-Level Endpoints in Scala
Presentation at Functional Scala 2023
Traditionally, developers have relied on constructing routing tables to build their REST APIs. These tables map specific routes to corresponding request handlers. However, this approach involves manual decoding of headers, query parameters, and request bodies, as well as encoding of responses. Despite its flexibility, this classic method has several drawbacks, including the need for extensive low-level code and the manual or semi-automated creation of documentation and client libraries.
Fortunately, the Scala open-source ecosystem offers superior alternatives for API development. Libraries like Tapir, Endpoints4s and ZIO HTTP enable developers to define endpoints at a higher level. With these solutions, developers can declare their endpoints in a high-level manner, eliminating the need to handle decoding and encoding. Additionally, they provide benefits like OpenAPI documentation and type-safe clients for free.
Watch the recording: