Document `middlewares` macro

Document `middlewares` macro and expose it directly so users can more
easily check its implementation from IDE.