diff --git a/.gitignore b/.gitignore index c69065e8..cb3fd668 100644 --- a/.gitignore +++ b/.gitignore @@ -342,7 +342,6 @@ healthchecksdb # wwwroot/images -*images/ .1YourProject !Admin.Core.Webapi.Template.1.0.0.nupkg /Admin.Core/.config diff --git a/src/hosts/ZhonTai.Host/Configs/appconfig.json b/src/hosts/ZhonTai.Host/Configs/appconfig.json index 2ac93b8c..b3dbbbe7 100644 --- a/src/hosts/ZhonTai.Host/Configs/appconfig.json +++ b/src/hosts/ZhonTai.Host/Configs/appconfig.json @@ -41,7 +41,7 @@ "routePrefix": "", //页脚 "footer": { - "enable": true, + "enable": false, "content": "Copyright 2022-中台Admin" } }, diff --git a/src/platform/ZhonTai.Admin/Core/Configs/AppConfig.cs b/src/platform/ZhonTai.Admin/Core/Configs/AppConfig.cs index 34bba4e5..00c79c7b 100644 --- a/src/platform/ZhonTai.Admin/Core/Configs/AppConfig.cs +++ b/src/platform/ZhonTai.Admin/Core/Configs/AppConfig.cs @@ -137,7 +137,7 @@ public class SwaggerFooterConfig /// /// 启用 /// - public bool Enable { get; set; } = true; + public bool Enable { get; set; } = false; /// /// 内容 diff --git a/src/platform/ZhonTai.Admin/Core/Filters/EnumSchemaFilter.cs b/src/platform/ZhonTai.Admin/Core/Filters/EnumSchemaFilter.cs index e252c309..8cd1b305 100644 --- a/src/platform/ZhonTai.Admin/Core/Filters/EnumSchemaFilter.cs +++ b/src/platform/ZhonTai.Admin/Core/Filters/EnumSchemaFilter.cs @@ -12,7 +12,6 @@ public class EnumSchemaFilter : ISchemaFilter { public void Apply(OpenApiSchema schema, SchemaFilterContext context) { - //CommonUtils.GetProperyCommentBySummary var type = context.Type; if (type.IsEnum) { @@ -23,10 +22,12 @@ public class EnumSchemaFilter : ISchemaFilter if (items?.Count > 0) { string description = string.Join(",", items); - schema.Extensions.Add("extensions", new OpenApiObject - { - ["description"] = new OpenApiString(description) - }); + //schema.Extensions.Add("extensions", new OpenApiObject + //{ + // ["description"] = new OpenApiString(description) + //}); + //CommonUtils.GetProperyCommentBySummary + schema.Description = string.IsNullOrEmpty(schema.Description) ? description : $"{schema.Description}:{description}"; } } diff --git a/src/platform/ZhonTai.Admin/Core/HostApp.cs b/src/platform/ZhonTai.Admin/Core/HostApp.cs index da47ae9f..955788ea 100644 --- a/src/platform/ZhonTai.Admin/Core/HostApp.cs +++ b/src/platform/ZhonTai.Admin/Core/HostApp.cs @@ -304,8 +304,6 @@ public class HostApp //c.OrderActionsBy(o => o.RelativePath); }); - options.SchemaFilter(); - options.CustomOperationIds(apiDesc => { var controllerAction = apiDesc.ActionDescriptor as ControllerActionDescriptor; @@ -313,7 +311,7 @@ public class HostApp }); options.ResolveConflictingActions(apiDescription => apiDescription.First()); - options.CustomSchemaIds(x => x.FullName); + //options.CustomSchemaIds(x => x.FullName); //options.DocInclusionPredicate((docName, description) => true); string[] xmlFiles = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); @@ -330,12 +328,17 @@ public class HostApp Url = appConfig.Swagger.Url, Description = "" }; - server.Extensions.Add("extensions", new OpenApiObject + if (appConfig.ApiUI.Footer.Enable) { - ["copyright"] = new OpenApiString(appConfig.ApiUI.Footer.Content) - }); + server.Extensions.Add("extensions", new OpenApiObject + { + ["copyright"] = new OpenApiString(appConfig.ApiUI.Footer.Content) + }); + } options.AddServer(server); + options.SchemaFilter(); + #region 添加设置Token的按钮 if (appConfig.IdentityServer.Enable) diff --git a/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading.gif b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading.gif new file mode 100644 index 00000000..3aa9c85a Binary files /dev/null and b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading.gif differ diff --git a/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@2x.gif b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@2x.gif new file mode 100644 index 00000000..bcc021eb Binary files /dev/null and b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@2x.gif differ diff --git a/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@3x.gif b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@3x.gif new file mode 100644 index 00000000..216aa5a0 Binary files /dev/null and b/src/platform/ZhonTai.ApiUI/src/knife4j-vue/src/assets/css/images/loading@3x.gif differ