如何在描述中获得多个标题,如下所示:
description: |
The Engine API ....
# Errors
The API uses standard HTTP status codes ...
# Versioning
Some other text在上面的例子中,错误和版本控制是两个标题。
目前,我要补充以下说明:
ApiInfoBuilder().description(" ... ")发布于 2019-11-08 07:32:37
你可以像这样进行降价:
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)https://stackoverflow.com/questions/58715639
复制相似问题