1
hutongqing
2024-10-29 9ca96199d92168fe221dda9aba56f55520a561d8
WIDESEAWCS_Server/WIDESEAWCS_Core/Extensions/SwaggerSetup.cs
@@ -35,16 +35,16 @@
            services.AddSwaggerGen(c =>
            {
                //遍历出全部的版本,做文档信息展示
                typeof(ApiVersions).GetEnumNames().ToList().ForEach(version =>
                //typeof(ApiVersions).GetEnumNames().ToList().ForEach(version =>
                //{
                c.SwaggerDoc("v1", new OpenApiInfo
                {
                    c.SwaggerDoc(version, new OpenApiInfo
                    {
                        Version = version,
                        Title = $"{ApiName} 接口文档——{RuntimeInformation.FrameworkDescription}",
                        Description = $"{ApiName} HTTP API " + version,
                    });
                    c.OrderActionsBy(o => o.RelativePath);
                    Version = "v1",
                    Title = $"{ApiName} 接口文档——{RuntimeInformation.FrameworkDescription}",
                    Description = $"{ApiName} HTTP API " + "v1"
                });
                c.OrderActionsBy(o => o.RelativePath);
                //});
                c.UseInlineDefinitionsForEnums();
                try
@@ -120,11 +120,7 @@
            /// <summary>
            /// V1 版本
            /// </summary>
            V1 = 1,
            /// <summary>
            /// V2 版本
            /// </summary>
            V2 = 2,
            V1 = 1
        }
    }
}