hutongqing
2024-12-13 a75d7e725df5686caf39cc1dade2d6fae11c3d40
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/SwaggerSetup.cs
@@ -27,7 +27,7 @@
        {
            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.Get(new string[] { "ApiName" });
@@ -50,14 +50,15 @@
                c.UseInlineDefinitionsForEnums();
                try
                {
                    //这个就是刚刚配置的xml文件名
                    //var xmlPath = Path.Combine(basePath, "Blog.Core.xml");
                    var xmlPath = Path.Combine(basePath, "WIDESEA_WMSServer.xml");
                    //默认的第二个参数是false,这个是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)
                {