在 UI 中为控制器中的操作添加嵌套分组部分

Adding Nested Grouping Sections in the UI for Actions within a Controller(在 UI 中为控制器中的操作添加嵌套分组部分)
本文介绍了在 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 中为控制器中的操作添加嵌套分组部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)