I have a REST service method annotated with
@ApiOperation(value = "some string")
some string to generate newlines in the HTML page swagger-ui.html
(i.e. in the Swagger UI page where I see my docs and I can test my API methods).
I tried putting
some string, and anything I could think of,
and anything I could find as suggestions here on SO… but nothing works.
Any ideas? Or is it just not possible?
I see the project uses Swagger 1.5.20 JARs.
That version I cannot change.
I am afraid that you cannot put line breaks into the summary field as opposed to description field. Check the comment from a member of Swagger team: Swagger UI ignores line breaks in description
summaryfield is displayed as a single line because the summary text is inside of a
<span>element. Being an inline element, the span ignores
<br>is not showing up because the
summaryfield is a simple string field, as opposed to
description, which is a Markdown field …