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

由网友(染墨音尘绝)分享简介:是否可以在操作分组中包含子部分?我们目前使用基于控制器的微分来分组功能,但托管了大量控制器并且可以使用进一步的嵌套.Is it possible to have subsections within an action grouping? We currently use Controller-based diffe...

是否可以在操作分组中包含子部分?我们目前使用基于控制器的微分来分组功能,但托管了大量控制器并且可以使用进一步的嵌套.

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

阅读全文

相关推荐

最新文章