C
C#5mo ago
Drunkreaper

How to re-order endpoints in SwaggerUI ?

For instance if I want to switch the places of these 2 controllers how should I do that? I tried adding numbers in front of the controller's name but that only rearranged them in the solution explorer
No description
3 Replies
lycian
lycian5mo ago
Terence Golla
Swashbuckle Custom Ordering of Controllers
This article is an adaptation of an article written by Rob Janssen (RobIII) in 2018 on customizing the order in which controllers are display in the Swagger UI by Swashbuckle. It addresses the depreciation of the method OrderActionGroupsBy which is no longer available when using AddSwaggerGen, UseSwagger and UseSwaggerUI in your ASP.NET API pro...
GitHub
GitHub - domaindrivendev/Swashbuckle.AspNetCore: Swagger tools for ...
Swagger tools for documenting API's built on ASP.NET Core - GitHub - domaindrivendev/Swashbuckle.AspNetCore: Swagger tools for documenting API's built on ASP.NET Core
Mayor McCheese
Mayor McCheese5mo ago
Just an observation, your routes with spaces are a bit cursed. But moreover, post /person/create-person is redundant from a rest design perspective; same with delete. At least if you're looking towards using rest. Person is a resource, and the http verbs already describe the operations.
Drunkreaper
Drunkreaper5mo ago
I see... great ty, also love the House pic