delphimvcframework
delphimvcframework copied to clipboard
Swagger describing SSE endpoint
trafficstars
How to describe controller using SWAG* Attributes (and MVCDoc?) to get the well formatted name of SSE Endpoint?
type
[MVCPath('/v1/events')]
[MVCSWAGDefaultSummaryTags('Events')] -> this does not show well-formatted name of endpoint in swagger
TEventsController = class(TMVCSSEController)
protected
function GetServerSentEvents(const LastEventID: String): TMVCSSEMessages; override;
end;
You can describe your SSE controller using the MVCSwagSummary attribute. The Description parameter of the MVCSwagSummary accepts a string in markdown format.
Does not work, does it work for you?
TEventsController = class(TMVCSSEController)
protected
[MVCSwagSummary(TSwaggerConst.USE_DEFAULT_SUMMARY_TAGS, 'Endpoint description', 'GetServerSentEvents')]
function GetServerSentEvents(const LastEventID: String): TMVCSSEMessages; override;
end;