abp vnext swagger 注释

在启动模块中找到配置Swagger的方法,在Options中添加xml文档的地址,xml需要在生成的时候勾选输出xml

 var basepath = PlatformServices.Default.Application.ApplicationBasePath;
                    var xmlPath = Path.Combine(basepath, "xx.xx.Application.Contracts.xml");
                    options.IncludeXmlComments(xmlPath, false);

                    xmlPath = Path.Combine(basepath, "xx.xx.Application.xml");
                    options.IncludeXmlComments(xmlPath, false);

可以添加多个xml文档

posted @ 2021-03-03 18:25  Max..Zhang  阅读(306)  评论(0编辑  收藏  举报