Adding Nested Grouping Sections in the UI for Actions within a Controller

本小妞迷上赌 提交于 2019-12-02 17:26:53

问题


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());

Thanks for all the help!


回答1:


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.

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/index http://swashbuckletest.azurewebsites.net/swagger/ui/index?filter=Test



I have not published my version to Nuget yet, if you want to try it is here: https://www.myget.org/feed/heldersepu/package/nuget/Swagger-Net



来源:https://stackoverflow.com/questions/45154322/adding-nested-grouping-sections-in-the-ui-for-actions-within-a-controller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!