You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you can document endpoint using SwaggerOperation attribute above HandleAsync method:
[SwaggerOperation(Summary="Submit a new article",Description="Enables the submission of new articles",OperationId="B349A6C4-1198-4B53-B9BE-85232E06F16E",Tags=new[]{"Article"})]
Personally, I don't like this approach. Another library (FastEndpoints) has interesting alternative:
publicclassDeleteCustomerSummary:Summary<DeleteCustomerEndpoint>{publicDeleteCustomerSummary(){Summary="Deleted a customer the system";Description="Deleted a customer the system";Response(204,"The customer was deleted successfully");Response(404,"The customer was not found in the system");}}
which produces this Swagger documentation:
IMO this is much cleaner, because I don't make my endpoints clogged up with comments.
Full project with this solution is here.
Is something like this possible with this library?
If not, I'm passing it to you as a feature request.
The text was updated successfully, but these errors were encountered:
I like that, too! I've seen FastEndpoints but didn't notice this. I wonder if they did anything to make it work, or if it's just a Swagger feature we can just use in the same manner?
Currently, you can document endpoint using
SwaggerOperation
attribute aboveHandleAsync
method:Personally, I don't like this approach. Another library (FastEndpoints) has interesting alternative:
which produces this Swagger documentation:
![swagger-docs](https://user-images.githubusercontent.com/76855180/180302029-fdd8cf6d-9d0b-464b-b7d0-60f3311bd2d6.jpg)
IMO this is much cleaner, because I don't make my endpoints clogged up with comments.
Full project with this solution is here.
Is something like this possible with this library?
If not, I'm passing it to you as a feature request.
The text was updated successfully, but these errors were encountered: