[bug fix] add missing middlewares in generator
v0.20.1