Shameless plug for my conference talk on why I prefer a "compiler" approach vs a "template" approach to API library generation https://www.youtube.com/watch?v=mgRreyw-Nlg
Based on experiences with the same generator at Stripe that Alex (founder of stainlessapi.com) built.