Closed CrisBogucki closed 4 years ago
Seems like a good idea. Do you know how to do so?
Maybe tags: https://swagger.io/docs/specification/grouping-operations-with-tags/ This has some good info on configuring swagger in asp.net core, but nothing on tags: https://code-maze.com/swagger-ui-asp-net-core-web-api/
This seems to have it: https://stackoverflow.com/a/53506078/13729
Any interest in doing a PR or you just want me to have a go at it?
I'm trying to do it ... with Route Generally, it is a great idea to write services in such a way, e.g. for logging in, registration. I plan to use it in my projects. Great idea. Look at what I've done here -> https://github.com/CrisBogucki/.NET-DRS-Modular-Monolith
if you want I can add my code
I got this working in my CleanArchitecture repo using SwaggerOperation
attribute:
https://github.com/ardalis/CleanArchitecture/blob/master/src/CleanArchitecture.Web/Endpoints/ToDoItems/Create.cs#L20-L25
I had to enable annotations: https://github.com/ardalis/CleanArchitecture/blob/master/src/CleanArchitecture.Web/Startup.cs#L48
And install this package: https://github.com/ardalis/CleanArchitecture/blob/master/src/CleanArchitecture.Web/CleanArchitecture.Web.csproj#L20
If someone wants to add these to the sample in this repo that would be appreciated. @jeastham1993
Yep, I can do that whilst I've got the code locally!
@ardalis done and pull request created :)
Fixed by #18
add grouping of endpoints in controllers in swagger.