Servant: Web APIs at the Type Level
summary
Servant is a Haskell type-level DSL that turns an API type into working artifacts: a server whose handlers only see validated values, an automatically derived Swagger/OpenAPI spec, and generated client code for JavaScript, TypeScript, Elm and more. The framework handles content negotiation and request decoding so invalid bodies become 400 responses before handlers run, can check internal URIs, supports QuickCheck request generation, and is useful just for producing correct client decoders even when the server isn’t written in Haskell.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:00What is Servant
- 7:00Servant Language
- 12:48Server
- 15:30Handling errors
- 16:30Documentation
- 17:34Client Functions
related talks
56mServant at Bitnomial - Expanding type-safety from applications to systems
43mAPI first with Swagger and Scala
49mBeautiful APIs with Scala, Scalatra, Swagger, and Akka
31mPAIN-FREE APIS WITH SMITHY4S
46mPainless software development with Haskell
22mSpecification-Driven Development of REST APIs
21mProduction Haskell Demystified
31mBuilding an OpenAPI from Typescript
