Swagger Springfox:标题说明
我们如何在描述中获得多个标题,如下所示:Swagger Springfox:标题说明,swagger,springfox,Swagger,Springfox,我们如何在描述中获得多个标题,如下所示: description: | The Engine API .... # Errors The API uses standard HTTP status codes ... # Versioning Some other text ApiInfoBuilder().description(" ... ") 在上面的示例中,错误和版本控制是两个标题 目前,我正在添加以下说明: description: | The Engine API
description: |
The Engine API ....
# Errors
The API uses standard HTTP status codes ...
# Versioning
Some other text
ApiInfoBuilder().description(" ... ")
在上面的示例中,错误和版本控制是两个标题
目前,我正在添加以下说明:
description: |
The Engine API ....
# Errors
The API uses standard HTTP status codes ...
# Versioning
Some other text
ApiInfoBuilder().description(" ... ")
你可以这样做:
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>";