如何让swagger 2.0支持WebApi区域?

Dol*_*hin 5 asp.net swagger swagger-2.0 swashbuckle

我将swagger-ui(版本2.0)集成到我的Asp.Net WebApi 4.0项目中.这是我的路由配置:

config.Routes.MapHttpRoute(
                name: "Common_Get",
                routeTemplate: "common/{controller}/{action}/{id}",
                defaults: new { id = RouteParameter.Optional, action = "Get" },
                constraints: new { httpMethod = new HttpMethodConstraint("GET") }
            );


 config.Routes.MapHttpRoute(
                name: "Active_Get",
                routeTemplate: "active/{controller}/{action}/{id}",
                defaults: new { id = RouteParameter.Optional, action = "Get" },
                constraints: new { httpMethod = new HttpMethodConstraint("GET") }
            );
Run Code Online (Sandbox Code Playgroud)

并且swagger-ui生成文档包含无用的项目.commonactive具有相同的控制器+动作.就像这样:

get /common/Advert/GetAdvertise/{id} 
get /active/Advert/GetAdvertise/{id}

get /common/award/GetAward/{id} 
get /active/award/GetAward/{id} 
Run Code Online (Sandbox Code Playgroud)

如何避免这个问题或启用swagger支持区域(无论名称).我可以指定每个控制器的区域.正确的结果可能是这样的:

get /common/Advert/GetAdvertise/{id}
get /active/Award/GetAward/{id}
Run Code Online (Sandbox Code Playgroud)