From c4a48dc919275408811c2295c8c3222e65b03daa Mon Sep 17 00:00:00 2001
From: wangjunzzz <>
Date: Tue, 27 Jan 2026 21:10:36 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4AbpSwashbuckleModule?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aspnet-core/Directory.Build.Volo.targets | 2 +-
aspnet-core/Directory.Build.targets | 4 +-
.../Lion.AbpPro.AspNetCore/GlobalUsings.cs | 4 --
.../Lion.AbpPro.AspNetCore.csproj | 4 +-
.../AspNetCore/AbpProAspNetCoreModule.cs | 2 -
.../Builder/ApplicationBuilderExtensions.cs | 2 +-
.../Mvc/Filters/AbpProExceptionFilter.cs | 2 +
.../ServiceCollectionExtensions.cs | 33 ++++---------
.../Swagger/CachingSwaggerProvider.cs | 4 +-
.../Swagger/EnumSchemaFilter.cs | 20 ++++----
.../Swagger/HiddenAbpDefaultApiFilter.cs | 48 ++++++++++++++++++-
.../Lion.AbpPro.Core/Lion.AbpPro.Core.csproj | 1 +
.../BasicManagementHttpApiHostModule.cs | 4 +-
.../GlobalUsings.cs | 1 -
...AbpPro.BasicManagement.HttpApi.Host.csproj | 1 -
....AbpPro.BasicManagement.Application.csproj | 3 +-
...taDictionaryManagementHttpApiHostModule.cs | 3 +-
.../GlobalUsings.cs | 1 -
...taDictionaryManagement.HttpApi.Host.csproj | 1 -
.../FileManagementHttpApiHostModule.cs | 4 +-
.../GlobalUsings.cs | 2 +-
....AbpPro.FileManagement.HttpApi.Host.csproj | 1 -
.../GlobalUsings.cs | 2 +-
.../LanguageManagementHttpApiHostModule.cs | 4 +-
...Pro.LanguageManagement.HttpApi.Host.csproj | 1 -
.../GlobalUsings.cs | 2 +-
...NotificationManagement.HttpApi.Host.csproj | 1 -
...NotificationManagementHttpApiHostModule.cs | 4 +-
.../AbpProHttpApiHostModule.cs | 11 ++---
.../Lion.AbpPro.HttpApi.Host/GlobalUsings.cs | 1 -
.../Lion.AbpPro.HttpApi.Host.csproj | 1 -
31 files changed, 100 insertions(+), 74 deletions(-)
diff --git a/aspnet-core/Directory.Build.Volo.targets b/aspnet-core/Directory.Build.Volo.targets
index 35e7987a..a3b3b6c5 100644
--- a/aspnet-core/Directory.Build.Volo.targets
+++ b/aspnet-core/Directory.Build.Volo.targets
@@ -34,7 +34,6 @@
-
@@ -94,5 +93,6 @@
+
\ No newline at end of file
diff --git a/aspnet-core/Directory.Build.targets b/aspnet-core/Directory.Build.targets
index 3dc2b481..a6aa15d3 100644
--- a/aspnet-core/Directory.Build.targets
+++ b/aspnet-core/Directory.Build.targets
@@ -58,8 +58,8 @@
-
-
+
+
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/GlobalUsings.cs
index 01cba018..8c3544f2 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/GlobalUsings.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/GlobalUsings.cs
@@ -17,7 +17,6 @@ global using Lion.AbpPro;
global using Lion.AbpPro.Core;
global using Lion.AbpPro.Localization;
global using Microsoft.AspNetCore.Http;
-global using Microsoft.AspNetCore.Mvc;
global using Microsoft.AspNetCore.Mvc.Abstractions;
global using Microsoft.AspNetCore.Mvc.ApiExplorer;
global using Microsoft.EntityFrameworkCore;
@@ -27,8 +26,6 @@ global using Microsoft.Extensions.Localization;
global using Microsoft.Extensions.Logging;
global using Microsoft.Extensions.Logging.Abstractions;
global using Microsoft.Extensions.Options;
-global using Microsoft.OpenApi.Any;
-global using Microsoft.OpenApi.Models;
global using Ocelot.Middleware;
global using Serilog.Exceptions;
global using Serilog.Sinks.Elasticsearch;
@@ -36,7 +33,6 @@ global using Swashbuckle.AspNetCore.Swagger;
global using Swashbuckle.AspNetCore.SwaggerGen;
global using Volo.Abp.AspNetCore.ExceptionHandling;
global using Volo.Abp.AspNetCore.Mvc;
-global using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
global using Volo.Abp.Authorization;
global using Volo.Abp.DependencyInjection;
global using Volo.Abp.Domain.Entities;
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
index cb983e82..2fe0f5d3 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion.AbpPro.AspNetCore.csproj
@@ -12,8 +12,10 @@
-
+
+
+
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
index c875b387..4114d291 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Lion/AbpPro/AspNetCore/AbpProAspNetCoreModule.cs
@@ -1,9 +1,7 @@
using Lion.AbpPro.AspNetCore.Options;
-using Volo.Abp.Swashbuckle;
namespace Lion.AbpPro.AspNetCore;
-//[DependsOn(typeof(AbpSwashbuckleModule))]
public class AbpProAspNetCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs
index 4f128411..d9ac7f5a 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Builder/ApplicationBuilderExtensions.cs
@@ -84,7 +84,7 @@ public static class ApplicationBuilderExtensions
var swaggerOptions = app.ApplicationServices.GetRequiredService>().Value;
if (!swaggerOptions.Enabled) return app;
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint(endpoint, name);
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Mvc/Filters/AbpProExceptionFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Mvc/Filters/AbpProExceptionFilter.cs
index 5a22d599..ba7e3753 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Mvc/Filters/AbpProExceptionFilter.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/AspNetCore/Mvc/Filters/AbpProExceptionFilter.cs
@@ -1,3 +1,5 @@
+using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
+
namespace Microsoft.AspNetCore.Mvc.Filters;
[Dependency(ReplaceServices = true)]
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
index 03d84a47..8579c3e2 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Microsoft/Extensions/DependencyInjection/ServiceCollectionExtensions.cs
@@ -2,8 +2,10 @@
using Lion.AbpPro.AspNetCore;
using Lion.AbpPro.AspNetCore.Options;
using Microsoft.AspNetCore.Authentication.JwtBearer;
+using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.IdentityModel.Tokens;
+using Microsoft.OpenApi;
using Swagger;
using Volo.Abp.AspNetCore.Auditing;
using Volo.Abp.AspNetCore.MultiTenancy;
@@ -158,7 +160,7 @@ public static class ServiceCollectionExtensions
service.AddSwaggerGen(options =>
{
// 文件下载类型
- options.MapType(() => new OpenApiSchema() { Type = "file" });
+ //options.MapType(() => new OpenApiSchema() { Type = "file" });
options.SwaggerDoc(name, new OpenApiInfo { Title = name, Version = version });
options.DocInclusionPredicate((docName, description) => true);
//options.EnableAnnotations(); // 启用注解
@@ -181,21 +183,12 @@ public static class ServiceCollectionExtensions
Scheme = JwtBearerDefaults.AuthenticationScheme,
BearerFormat = "JWT"
});
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
+
+ options.AddSecurityRequirement(document => new OpenApiSecurityRequirement()
{
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- {
- Type = ReferenceType.SecurityScheme, Id = "Bearer"
- }
- },
- new List()
- }
+ [new OpenApiSecuritySchemeReference("Bearer", document)] = []
});
-
- options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme()
+ options.AddSecurityDefinition("Accept-Language", new OpenApiSecurityScheme()
{
Type = SecuritySchemeType.ApiKey,
In = ParameterLocation.Header,
@@ -203,17 +196,11 @@ public static class ServiceCollectionExtensions
Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans",
});
- options.AddSecurityRequirement(new OpenApiSecurityRequirement
+ options.AddSecurityRequirement(document => new OpenApiSecurityRequirement()
{
- {
- new OpenApiSecurityScheme
- {
- Reference = new OpenApiReference
- { Type = ReferenceType.SecurityScheme, Id = "ApiKey" }
- },
- Array.Empty()
- }
+ [new OpenApiSecuritySchemeReference("Accept-Language", document)] = []
});
+
});
return service;
}
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
index cfd40fd5..24ab8ba9 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/CachingSwaggerProvider.cs
@@ -1,4 +1,6 @@
-namespace Swagger;
+using Microsoft.OpenApi;
+
+namespace Swagger;
///
/// swagger注释加载慢,把文档添加到缓存
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
index 1197d5de..71077b3c 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/EnumSchemaFilter.cs
@@ -1,3 +1,6 @@
+using System.Text.Json.Nodes;
+using Microsoft.OpenApi;
+
namespace Swagger;
///
@@ -6,16 +9,17 @@ namespace Swagger;
///
public class EnumSchemaFilter : ISchemaFilter
{
- public void Apply(OpenApiSchema schema, SchemaFilterContext context)
+ public void Apply(IOpenApiSchema schema, SchemaFilterContext context)
{
- if (context.Type.IsEnum)
+ if (schema is OpenApiSchema openApiScheme && context.Type.IsEnum)
{
- var array = new OpenApiArray();
- array.AddRange(Enum.GetNames(context.Type).Select(n => new OpenApiString(n)));
- // NSwag
- schema.Extensions.Add("x-enumNames", array);
- // Openapi-generator
- schema.Extensions.Add("x-enum-varnames", array);
+ openApiScheme.Enum?.Clear();
+ openApiScheme.Type = JsonSchemaType.String;
+ openApiScheme.Format = null;
+ foreach (var name in Enum.GetNames(context.Type))
+ {
+ openApiScheme.Enum?.Add(JsonNode.Parse($"\"{name}\"")!);
+ }
}
}
}
\ No newline at end of file
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
index e4155e36..8d0023ac 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.AspNetCore/Swagger/HiddenAbpDefaultApiFilter.cs
@@ -1,3 +1,5 @@
+using Microsoft.OpenApi;
+
namespace Swagger;
///
@@ -8,15 +10,57 @@ public class HiddenAbpDefaultApiFilter : IDocumentFilter
{
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
{
+ // 首先收集需要移除的路径
+ var pathsToRemove = new List();
+
foreach (ApiDescription apiDescription in context.ApiDescriptions)
{
if (apiDescription.TryGetMethodInfo(out MethodInfo method))
{
string key = "/" + apiDescription.RelativePath;
- var reuslt = IsHidden(key);
- if (reuslt) swaggerDoc.Paths.Remove(key);
+ var result = IsHidden(key);
+ if (result)
+ pathsToRemove.Add(key);
+ }
+ }
+
+ // 移除匹配的路径
+ foreach (var path in pathsToRemove)
+ {
+ swaggerDoc.Paths.Remove(path);
+ }
+
+ // 检查并移除空的标签(分组)
+ RemoveEmptyTags(swaggerDoc);
+ }
+
+ private void RemoveEmptyTags(OpenApiDocument swaggerDoc)
+ {
+ if (swaggerDoc.Tags == null || !swaggerDoc.Tags.Any())
+ return;
+
+ // 获取所有路径中使用的标签
+ var usedTags = new HashSet();
+ foreach (var pathItem in swaggerDoc.Paths)
+ {
+ foreach (var operation in pathItem.Value.Operations.Values)
+ {
+ if (operation.Tags != null)
+ {
+ foreach (var tag in operation.Tags)
+ {
+ usedTags.Add(tag.Name);
+ }
+ }
}
}
+
+ // 移除未使用的标签
+ var tagsToRemove = swaggerDoc.Tags.Where(tag => !usedTags.Contains(tag.Name)).ToList();
+ foreach (var tag in tagsToRemove)
+ {
+ swaggerDoc.Tags.Remove(tag);
+ }
}
private bool IsHidden(string key)
diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
index 70a3bdf5..e96be02e 100644
--- a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
+++ b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion.AbpPro.Core.csproj
@@ -8,6 +8,7 @@
+
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
index d158c490..fd382aef 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/BasicManagementHttpApiHostModule.cs
@@ -11,7 +11,7 @@ namespace Lion.AbpPro.BasicManagement;
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(AbpSwashbuckleModule),
+
typeof(AbpProAspNetCoreModule)
)]
public class BasicManagementHttpApiHostModule : AbpModule
@@ -50,7 +50,7 @@ public class BasicManagementHttpApiHostModule : AbpModule
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/BasicManagement/swagger.json", "BasicManagement API");
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
index 523982cb..243e1542 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/GlobalUsings.cs
@@ -20,4 +20,3 @@ global using Volo.Abp.Caching.StackExchangeRedis;
global using Volo.Abp.EntityFrameworkCore;
global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
-global using Volo.Abp.Swashbuckle;
\ No newline at end of file
diff --git a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
index 00a83ddf..1276cbd2 100644
--- a/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/BasicManagement/host/Lion.AbpPro.BasicManagement.HttpApi.Host/Lion.AbpPro.BasicManagement.HttpApi.Host.csproj
@@ -19,7 +19,6 @@
-
diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
index f7cd94ba..2af973ad 100644
--- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
+++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Application/Lion.AbpPro.BasicManagement.Application.csproj
@@ -9,9 +9,10 @@
-
+
+
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
index d1b2dc94..3e58a4be 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/DataDictionaryManagementHttpApiHostModule.cs
@@ -17,7 +17,6 @@ namespace Lion.AbpPro.DataDictionaryManagement
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(AbpSwashbuckleModule),
typeof(AbpProAspNetCoreModule)
)]
public class DataDictionaryManagementHttpApiHostModule : AbpModule
@@ -54,7 +53,7 @@ namespace Lion.AbpPro.DataDictionaryManagement
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/DataDictionaryManagement/swagger.json", "DataDictionaryManagement API");
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
index 6c2bb563..554dbfec 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/GlobalUsings.cs
@@ -33,5 +33,4 @@ global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
global using Volo.Abp.PermissionManagement.EntityFrameworkCore;
global using Volo.Abp.SettingManagement.EntityFrameworkCore;
-global using Volo.Abp.Swashbuckle;
global using Volo.Abp.VirtualFileSystem;
\ No newline at end of file
diff --git a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
index f79737ec..fb4ad5d7 100644
--- a/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/DataDictionaryManagement/host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host/Lion.AbpPro.DataDictionaryManagement.HttpApi.Host.csproj
@@ -18,7 +18,6 @@
-
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
index bcae3d6e..76aad57f 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/FileManagementHttpApiHostModule.cs
@@ -10,7 +10,7 @@ namespace Lion.AbpPro.FileManagement;
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(AbpSwashbuckleModule),
+
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpProAspNetCoreModule)
)]
@@ -48,7 +48,7 @@ public class FileManagementHttpApiHostModule : AbpModule
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/FileManagement/swagger.json", "FileManagement API");
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
index c64ec7ad..ddd41523 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/GlobalUsings.cs
@@ -28,5 +28,5 @@ global using Volo.Abp.Caching.StackExchangeRedis;
global using Volo.Abp.EntityFrameworkCore;
global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
-global using Volo.Abp.Swashbuckle;
+
global using Volo.Abp.VirtualFileSystem;
\ No newline at end of file
diff --git a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
index 6421967f..f2210525 100644
--- a/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/FileManagement/host/Lion.AbpPro.FileManagement.HttpApi.Host/Lion.AbpPro.FileManagement.HttpApi.Host.csproj
@@ -27,7 +27,6 @@
-
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
index 4262977b..7f8e9178 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/GlobalUsings.cs
@@ -33,5 +33,5 @@ global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
global using Volo.Abp.PermissionManagement.EntityFrameworkCore;
global using Volo.Abp.SettingManagement.EntityFrameworkCore;
-global using Volo.Abp.Swashbuckle;
+
global using Volo.Abp.VirtualFileSystem;
\ No newline at end of file
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
index ff2bd9f4..97450791 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/LanguageManagementHttpApiHostModule.cs
@@ -16,7 +16,7 @@ namespace Lion.AbpPro.LanguageManagement
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(AbpSwashbuckleModule),
+
typeof(AbpProAspNetCoreModule)
)]
public class LanguageManagementHttpApiHostModule : AbpModule
@@ -53,7 +53,7 @@ namespace Lion.AbpPro.LanguageManagement
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/LanguageManagement/swagger.json", "LanguageManagement API");
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
index dc0e3c0f..e438c878 100644
--- a/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Lion.AbpPro.LanguageManagement.HttpApi.Host.csproj
@@ -19,7 +19,6 @@
-
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
index 9fdf0998..2ec9983a 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/GlobalUsings.cs
@@ -25,5 +25,5 @@ global using Volo.Abp.Caching.StackExchangeRedis;
global using Volo.Abp.EntityFrameworkCore;
global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
-global using Volo.Abp.Swashbuckle;
+
global using Volo.Abp.VirtualFileSystem;
\ No newline at end of file
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
index 6b14260a..08ee7669 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/Lion.AbpPro.NotificationManagement.HttpApi.Host.csproj
@@ -25,7 +25,6 @@
-
diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
index 57c975f8..232ca17d 100644
--- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
+++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
@@ -10,7 +10,7 @@ namespace Lion.AbpPro.NotificationManagement;
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpAspNetCoreSerilogModule),
- typeof(AbpSwashbuckleModule),
+
typeof(AbpProCapModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpProAspNetCoreModule)
@@ -49,7 +49,7 @@ public class NotificationManagementHttpApiHostModule : AbpModule
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
- app.UseAbpSwaggerUI(options =>
+ app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/NotificationManagement/swagger.json", "NotificationManagement API");
options.DocExpansion(DocExpansion.None);
diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs
index 84290bb4..513132d6 100644
--- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs
+++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs
@@ -15,8 +15,7 @@ namespace Lion.AbpPro;
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpBlobStoringFileSystemModule),
- typeof(AbpProStarterModule),
- typeof(AbpSwashbuckleModule)
+ typeof(AbpProStarterModule)
//typeof(AbpBackgroundJobsHangfireModule)
)]
public partial class AbpProHttpApiHostModule : AbpModule
@@ -29,6 +28,7 @@ public partial class AbpProHttpApiHostModule : AbpModule
// options.ConventionalControllers.Create(typeof(AbpProApplicationModule).Assembly);
// });
}
+
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services
@@ -64,20 +64,19 @@ public partial class AbpProHttpApiHostModule : AbpModule
app.UseAuthentication();
app.UseAbpProMultiTenancy();
app.UseAuthorization();
- app.UseAbpProSwaggerUI("/swagger/AbpPro/swagger.json","AbpPro");
+ app.UseAbpProSwaggerUI("/swagger/AbpPro/swagger.json", "AbpPro");
app.UseAbpProAuditing();
app.UseAbpSerilogEnrichers();
app.UseUnitOfWork();
app.UseConfiguredEndpoints(endpoints =>
{
- endpoints.MapHealthChecks("/health");
-
+ endpoints.MapHealthChecks("/health");
+
// endpoints.MapHangfireDashboard("/hangfire", new DashboardOptions()
// {
// Authorization = new[] { new CustomHangfireAuthorizeFilter() },
// IgnoreAntiforgeryToken = true
// });
-
});
app.UseAbpProConsul();
}
diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs
index ad611b61..42436028 100644
--- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs
+++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/GlobalUsings.cs
@@ -77,6 +77,5 @@ global using Volo.Abp.Json;
global using Volo.Abp.Localization;
global using Volo.Abp.Modularity;
global using Volo.Abp.MultiTenancy;
-global using Volo.Abp.Swashbuckle;
global using Volo.Abp.Users;
global using Volo.Abp.Validation;
\ No newline at end of file
diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj
index 1a71545d..5bfcc26a 100644
--- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj
+++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/Lion.AbpPro.HttpApi.Host.csproj
@@ -13,7 +13,6 @@
-