From 18d1f45193e34e00fc1b6f65b8596ddb29c5267d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 24 十二月 2024 15:32:43 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs" index 30c52f8..264c52b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs" @@ -27,9 +27,9 @@ { if (services == null) throw new ArgumentNullException(nameof(services)); - var basePath = AppContext.BaseDirectory; + var basePath = AppDomain.CurrentDomain.BaseDirectory; //var basePath2 = Microsoft.DotNet.PlatformAbstractions.ApplicationEnvironment.ApplicationBasePath; - var ApiName = AppSettings.app(new string[] { "ApiName" }); + var ApiName = AppSettings.Get(new string[] { "ApiName" }); services.AddSwaggerGen(c => { @@ -50,14 +50,15 @@ c.UseInlineDefinitionsForEnums(); try { - //杩欎釜灏辨槸鍒氬垰閰嶇疆鐨剎ml鏂囦欢鍚� - //var xmlPath = Path.Combine(basePath, "Blog.Core.xml"); + var xmlPath = Path.Combine(basePath, "WIDESEA_WMSServer.xml"); //榛樿鐨勭浜屼釜鍙傛暟鏄痜alse锛岃繖涓槸controller鐨勬敞閲婏紝璁板緱淇敼 - //c.IncludeXmlComments(xmlPath, true); + c.IncludeXmlComments(xmlPath, true); - //杩欎釜灏辨槸Model灞傜殑xml鏂囦欢鍚� - //var xmlModelPath = Path.Combine(basePath, "Blog.Core.Model.xml"); - //c.IncludeXmlComments(xmlModelPath); + var xmlModelPath = Path.Combine(basePath, "WIDESEA_Model.xml"); + c.IncludeXmlComments(xmlModelPath); + + var xmlDTOPath = Path.Combine(basePath, "WIDESEA_DTO.xml"); + c.IncludeXmlComments(xmlDTOPath); } catch (Exception ex) { -- Gitblit v1.9.3