fix the issue of generic api docs has no macros expanded