我错过了,现在可以了。我将架构分布在不同的asp.net核心程序集中,并且Swagger UI 3.0确实支持添加多个XML源。
要包括控制器注释本身,我们必须设置includeControllerXmlComments:true
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test1.xml"), includeControllerXmlComments: true);
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test2.xml"), includeControllerXmlComments: true);
c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "test3.xml"), includeControllerXmlComments: true);