A Contract-First Approach to Building API-Dependent Applications
summary
Describes replacing fragile per-client XML Schema checks with runtime contracts expressed as refined algebraic types and exhaustive pattern matching in Ruby. The approach runs pre- and post-call validation and attaches semantic debug context to raw request/response pairs, enabling reusable validations across carriers and faster root-cause debugging in production.
AI-written summary · about
chapters (17)
- 0:00Contract-first introduction
- 1:02API dependency problems
- 2:07Typical API integration
- 3:53What is a software contract
- 4:15Schema-based contracts
- 7:46Schema validation
- 9:51Schema contract challenges
- 10:32Functional approach
- 12:21Refined types in Haskell
- 14:26Refined types in Ruby
- 16:54Algebraic data types
- 18:18Refined types validation
- 20:30Semantic logging with types
- 22:40Schema vs types comparison
- 24:48Debugging in production
- 25:29Recommended books
- 26:33Q&A
