An API refined over 18 months
summary
Refined is used to add precise compile-time and runtime checks to Scala REST APIs by extracting Refined predicates from case classes and using macros plus Play integration to generate JSON Schema and Swagger/OpenAPI docs. The library demonstrates request validation that returns 400 for bad bodies, enriches Play error responses with expected schemas, and serves an OpenAPI document; it’s implemented to compile on Scala 2.13 as a working proof of concept.
AI-written summary · about
chapters (9)
- 0:00API introduction
- 2:25Good API definition
- 7:07Riz Fine library
- 10:41Improving REST APIs
- 12:04Executable documentation
- 17:51Technical demo
- 28:55Data validation
- 34:09Use cases and benefits
- 36:23Q&A
related talks
30mDecorate your types with refined
43mAPI first with Swagger and Scala
49mBeautiful APIs with Scala, Scalatra, Swagger, and Akka
28mAutomating API Busywork with Scala
48mRefactoring of REST API
58mA Better REST with Type level Programming in Scala
31mPAIN-FREE APIS WITH SMITHY4S
36mHow to Build a Functional API
