How to add line break to Swashbuckle documentation?

Another way to achieve is creating a custom OperationFilter and use the xml documentation tags as explained in :

https://github.com/domaindrivendev/Swashbuckle/issues/258

Hope this helps

Sam


None of the posted solutions will work with the newer version of Swagger. If you want a newline separation between your comment lines, you have to add /// for newline. That makes method comments lengthy but they will be more readable in the Swagger documentation.

///  <summary>
/// Comment Line 1
///  
/// Comment Line 2
///  
/// Comment Line 3
///  </summary>

Using Visual Studio 2019 (.net core 3.1), I'm able to use html remarks. It can be done all on one line using <br />. I've also tried other html tags such as underline and bold.

/// <summary>
    /// test
    /// </summary>
    /// <remarks><u>underline</u> "test line 1" <br /><b>Bold</b> "test line 2"  </remarks>  

enter image description here


I found that you can just add <br /> tags to the comments to achieve this.
Adding:

/// <br /> 

will cause a line break in the generated documentation.