Displaying line breaks in the response text

后端 未结 2 747
慢半拍i
慢半拍i 2021-01-24 21:08

I use Swagger UI v2.2.0. I have a RESTful method which returns plain text. I want to display this text with line breaks.

At the moment, the returned text contains new li

2条回答
  •  感情败类
    2021-01-24 21:55

    This is currently not possible due to a documented bug in Swagger UI. Reference:

    Inconsistent Markdown Newlines #2981

    Bug in Model (Definition) Description with newline characters #3078

    The second Issue listed, #3078 contains some discussion on overriding the styles used to render that part of the UI, but results appear inconsistent.

    Note: I have subscribed to those issues and will update the answer and/or flag to close as no longer relevant when it is resolved.

提交回复
热议问题