From annotations to code: describing HTTP endpoints with Tapir
summary
Live-coding shows replacing annotation-driven HTTP mappings with immutable Scala values using the Tapir library, building two endpoints: GET /books (optional year filter and limit) and GET /books/{UUID}, plus a Year codec and a BookFilter case class to keep type safety and reuse. Endpoints compile to Akka HTTP integration routes, run on localhost:8080, and generate OpenAPI/Swagger docs (with examples). The demo actually serves JSON, enforces types at compile time, and returns 404-like error strings when not found.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 10:46Modeling HTTP endpoints
- 21:50Extracting common patterns
- 31:44Exposing endpoints as server
- 41:56Generating documentation
- 46:15Functional programming basics
- 49:50Tapir library overview
- 51:55Q&A and closing
related talks
33mYour HTTP endpoints are data, as well!
41mHow to write microservices in Scala without Akka
49mBeautiful APIs with Scala, Scalatra, Swagger, and Akka
23mOBJECT ALGEBRAS AND WHY YOU WON'T TOUCH HTTP LIBRARY EVER AGAIN
43mAPI first with Swagger and Scala
50mA FUNCTIONAL SCALA STACK FOR 2020
28mAutomating API Busywork with Scala
36mScale By The Bay 2018 Unconference: Devon Stewart
