Adding Nested Grouping Sections in the UI for Actions within a Controller(在 UI 中为控制器中的操作添加嵌套分组部分)
问题描述
是否可以在操作分组中包含子部分?我们目前使用基于控制器的微分来分组功能,但托管了大量控制器并且可以使用进一步的嵌套.
Is it possible to have subsections within an action grouping? We currently use Controller-based differentiation to group functions, but are hosting a large amount of controllers and could use further nesting.
换句话说,我知道动作可以按以下方式分组/排序,但可以多次分组:
In other words, I know actions can be grouped/ordered with the following, but can they be grouped multiple times:
c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString());c.OrderActionGroupsBy(new DescendingAlphabeticComparer());
c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString()); c.OrderActionGroupsBy(new DescendingAlphabeticComparer());
感谢大家的帮助!
推荐答案
理论上是的,我们可以多次分组操作,我们可以创建一个疯狂的嵌套组,swagger &swashbuckle 都是开源的,如果没有实现我们可以自己做,但我猜这需要很多时间.
In theory yes, we can group actions multiple times we can create an insanity of nested groups, swagger & swashbuckle are both open-source if is not implemented we can do it ourselves, but my guess is that it will take a lot of time.
我的建议:升级到最新的swagger-ui 3.x,最新版本有一个过滤器可以兼做搜索,看看我的最新:
My recommendation: upgrade to the latest swagger-ui 3.x, the latest version has a filter that doubles down as a search, take a look at my latest:
http://swashbuckletest.azurewebsites.net/swagger/ui/indexhttp://swashbuckletest.azurewebsites.net/swagger/ui/index?filter=测试
我还没有将我的版本发布到 Nuget,如果你想试试看这里:https://www.myget.org/feed/heldersepu/package/nuget/Swagger-Net
这篇关于在 UI 中为控制器中的操作添加嵌套分组部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 UI 中为控制器中的操作添加嵌套分组部分


基础教程推荐
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01