Skip to content

Commit

Permalink
😊 修复启用 Swashbuckle.AspNetCore.Annotations 拓展包后标签无效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MonkSoul committed Sep 7, 2024
1 parent a4db240 commit 9b27cf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ internal static void BuildGen(SwaggerGenOptions swaggerGenOptions, Action<Swagge
// 修复 editor.swagger.io 生成不能正常处理 C# object 类型问题
swaggerGenOptions.SchemaFilter<AnySchemaFilter>();

// 支持控制器排序操作
if (_specificationDocumentSettings.EnableTagsOrderDocumentFilter == true) swaggerGenOptions.DocumentFilter<TagsOrderDocumentFilter>();

// 添加 Action 操作过滤器
swaggerGenOptions.OperationFilter<ApiActionFilter>();

// 自定义配置
configure?.Invoke(swaggerGenOptions);

// 支持控制器排序操作
if (_specificationDocumentSettings.EnableTagsOrderDocumentFilter == true) swaggerGenOptions.DocumentFilter<TagsOrderDocumentFilter>();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ internal static void BuildGen(SwaggerGenOptions swaggerGenOptions, Action<Swagge
// 修复 editor.swagger.io 生成不能正常处理 C# object 类型问题
swaggerGenOptions.SchemaFilter<AnySchemaFilter>();

// 支持控制器排序操作
if (_specificationDocumentSettings.EnableTagsOrderDocumentFilter == true) swaggerGenOptions.DocumentFilter<TagsOrderDocumentFilter>();

// 添加 Action 操作过滤器
swaggerGenOptions.OperationFilter<ApiActionFilter>();

// 自定义配置
configure?.Invoke(swaggerGenOptions);

// 支持控制器排序操作
if (_specificationDocumentSettings.EnableTagsOrderDocumentFilter == true) swaggerGenOptions.DocumentFilter<TagsOrderDocumentFilter>();
}

/// <summary>
Expand Down

0 comments on commit 9b27cf4

Please sign in to comment.