Reputation: 10839
Let me start by saying ServiceStack has surpassed all my expectations as a framework. It is amazing what has been accomplished.
I am currently using the Swagger UI plugin with ServiceStack and was wondering is there a way to group resources separately than they appear now? It seems like the grouping is dictated by the root.
The current grouping does something like this:
/clients
/clients/{clientId}/locations/{id}
/clients/{clientId}/locations/{locationId}/reports
/clients/{clientId}/locations/{locationId}/reports/{id}
I'd rather have the swagger ui output something that looks like this:
Clients
/clients/{id}
Locations
/clients/{clientId}/locations
Reports
/clients/{clientId}/locations/{locationId}/reports
It would be cool if you could do something like shown above by using a grouping as shown below.
[Route("/hello/{Name}", "GET",
Summary = @"Says ""Hello"" to provided Name with GET.",
Notes = "Longer description of the GET method which says 'Hello'",
// like this!
SwaggerGroup="Clients")]
This might be more of a limitation of Swagger and not a limitation of ServiceStack but I thought I would ask.
Upvotes: 4
Views: 403
Reputation: 143319
ServiceStack doesn't make any modifications to the Swagger UI. If this feature does not exist in Swagger it wont be available in ServiceStack either.
That said the Swagger UI is generated with static JavaScript and HTML in the /swagger-ui folder so you're able to modify the UI and add any customizations you need in your local copy.
Upvotes: 1