Building out an API layer in C#, and using both Swagger and Swashbuckle for the documentation. So far, I'm loving it! Just one question.
By default, the layering of API's is two deep. Example... these are the currently available API's, with Access Integration: Integration Settings
expanded:
What I'm trying to figure out is how to have a single grouping of Access Integration
, which when clicked, would reveal these controllers:
- Integration
- Sync Users
- Sync Doors
- Access Events
And then you could drill into any one of the controllers to see the methods within them. So, basically, three layers instead of two.
Is this possible? I've been looking at this question: Grouping of API methods in documentation - is there some custom attribute, but it's not getting me there. And I've been trying to figure out how to use this:
c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString());
But I'm not finding any examples of how to use it.
I tried this:
[SwaggerOperation(Tags = new[] { "Access Integration", "Sync Doors" })]
and
[SwaggerOperation(Tags = new[] { "Access Integration", "Sync Users" })]
But that just listed each controller twice, once under "Access Integration" and again under "Sync Users".