Base solution for your next web application
Open Closed

Enable Swagger to use XML comments #5499


User avatar
0
MarkusBernhardt created

How can I enable Swagger to use XML comments?

Something like:

options.IncludeXmlComments

in Startup.cs of Web.Host? But how does that work together with AbpModules?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

4 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    just write summary/description on implement class, not interface

    — https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3285

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    MarkusBernhardt created

    Hi Aaron!

    I added the comments to both the implementation and the interface. But it does not work.

    Is there anything else I have to do?

    Best regards, Markus

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    MarkusBernhardt created

    Any more ideas? Anyone?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    alper created
    Support Team

    don't know why your implementation didn't work. but there's also another approach using XML Documentation <a class="postlink" href="https://exceptionnotfound.net/adding-swagger-to-asp-net-core-web-api-using-xml-documentation/">https://exceptionnotfound.net/adding-sw ... mentation/</a>

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)