Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Swagger Springfox:标题说明_Swagger_Springfox - Fatal编程技术网

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>";