Вы можете перейти с уценкой следующим образом:
String description = "# The Engine API ...\n" +
"## Errors\n" +
"The API uses standard HTTP status codes ...\n" +
"## Versioning\n" +
"Some other text\n";
Здесь важны новые строки \n
.
Или просто используйте простой HTML:
String description = "<h2>The Engine API ....</h2>" +
"<h3>Errors</h3>" +
"<p>The API uses standard HTTP status codes ...</p>" +
"<h3>Versioning</h3>" +
"<p>Some other text</p>";
Затем добавьте строку к информации API:
ApiInfoBuilder().description(description)