Generate namespaced routes correctly for generators. Fix for #11532
Merge pull request #11544 from prathamesh-sonpatki/namespaced_routes_test

Generate namespaced routes correctly for generators. Fix for #11532