修复部署问题

This commit is contained in:
橙子
2022-09-26 00:27:55 +08:00
parent ac946f4903
commit 83ce9fb4c4
4 changed files with 50 additions and 39 deletions

View File

@@ -31,7 +31,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
//为 Swagger JSON and UI设置xml文档注释路径
//获取应用程序所在目录(绝对路径不受工作目录影响建议采用此方法获取路径使用windwos&Linux
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
var apiXmlPath = Path.Combine(basePath, @"SwaggerDoc.xml");//控制器层注释
var apiXmlPath = Path.Combine(basePath, @"Config/SwaggerDoc.xml");//控制器层注释
//var entityXmlPath = Path.Combine(basePath, @"SwaggerDoc.xml");//实体注释
//c.IncludeXmlComments(apiXmlPath, true);//true表示显示控制器注释
c.IncludeXmlComments(apiXmlPath, true);