Writing an Open API Parser
summary
Builds a Kotlin OpenAPI parser that reads YAML via kaml and kotlinx.serialization, resolves $ref recursively, and generates a live Jetpack Compose UI mapping each path to cards and buttons. Traverses the spec multiple times—parse, resolve references, discover variable fields, render input dialogs, then substitute values and execute requests with OkHttp on Dispatchers.IO. Prototype uses Retrofit wiring, handles markdown descriptions, runs and issues real requests but omits authentication and uses a naive traversal that needs optimization.
AI-written summary · about
chapters (6)
- 0:00Introduction to OpenAPI parsers
- 2:54What is OpenAPI specification
- 6:32Building the parser in Kotlin
- 11:13Generating user interface
- 16:09Executing API calls from UI
- 17:55Future improvements and Q&A
related talks
38mLet me write your networking code
01h 00mDesigning Programmer-Friendly APIs
34mDesigning and evaluating usable APIs: Stories from Jetpack Compose World
41mBrick by Brick: Building Open Source libraries
41mGenerating Kotlin Code
35mAPI-First! Contract-First! Make API development great again!
29mDIY Dependency Injection with Kotlin
26mBuild your own compiler with KSP
