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