Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger describing SSE endpoint #632

Open
radexpol opened this issue Jan 30, 2023 · 2 comments
Open

Swagger describing SSE endpoint #632

radexpol opened this issue Jan 30, 2023 · 2 comments

Comments

@radexpol
Copy link
Contributor

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;
@joaoduarte19
Copy link
Collaborator

You can describe your SSE controller using the MVCSwagSummary attribute. The Description parameter of the MVCSwagSummary accepts a string in markdown format.

@radexpol
Copy link
Contributor Author

radexpol commented Feb 6, 2023

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants