Writing Sustainable AsyncAPI Generator Templates
summary
Shows that AsyncAPI Generator templates must be written as frameworks/libraries using inversion of control rather than as files you edit: with AsyncAPI Generator (AG, ~40,000 weekly npm downloads) and a Node.js/Mosquitto MQTT demo the original template overwrites handlers on regeneration and destroys user business logic. Replaces file-editing handlers with an exported API to register middleware (Express‑style), generates a runnable streetlights app from a spec, and proves regeneration adds channels without losing user code.
AI-written summary · about
chapters (9)
- 0:00AsyncAPI generator templates
- 1:02AsyncAPI generator and tooling
- 3:53Generator templates and specs
- 7:26Live demo: Node.js app
- 11:32Problems with traditional templates
- 16:52Inversion of control approach
- 18:41Live demo: new template architecture
- 22:37Maintaining templates with decoupled logic
- 24:53Summary
related talks
15mA Beginner's Guide to Generator Tool Use-cases
11mIncreasing consistency and speed through code-generation
24mNX Generators or how to skip boring tasks
21mUsing the AsyncAPI Ecosystem for your Event-Driven Architecture
43mDesigning Event-driven architectures with AsyncAPI
07h 52mAsyncAPI Conference 2021 - Day 1
33mSource Generators in Action
09mGSoC: Make your AsyncAPI document shorter with Optimizer
