我正在为我的api记录路径参数。但是它显示了一些自动生成的表名。我正在尝试从path参数中删除表名。我没有成功。
请帮帮我。
样本图像
发布于 2016-03-30 11:03:42
如果只想删除表标题的“表2”部分,可以尝试添加带有空标题的标题块。例如:
[caption=]
./v1/residences/{id}
include::{snippets}/index/request-parameters.adoc[]发布于 2020-03-17 13:58:19
最好的方法是将@jmformenti和@alek的答案结合起来:
path-parameters.snippet中创建一个文件src/test/resources/org/springframework/restdocs/templates/asciidoctor/[caption=]
.{{path}}
|===
|Parameter|Description
{{#parameters}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/parameters}}
|===现在,所有生成的path-parameters.adoc文件都有适当的内容,您不需要为每个包含添加它,比如在Alek的答案中。
https://stackoverflow.com/questions/36087736
复制相似问题