spring - Swagger @ApiParam 中的示例属性不起作用
问题描述
我有这段代码:
@ApiOperation(value = "Delete a Registration Form by id")
public void deleteRegistrationForm(
@ApiParam(name = "Repository Name", type = "String", value = "The Repository Name", example = "TestRepo") @PathVariable("repositoryName") String repositoryName,
@ApiParam(name = "Object Id", type = "String", value = "r_object_id of the registration form", example = "090bc7b480735775") @PathVariable("documentId") String id)
我期待示例属性中指定的字符串“TestRepo”会在 Swagger UI 的输入中显示为占位符。
但是,这就是我得到的: Swagger UI 输出
我用谷歌搜索了这个,但我找不到任何帮助。
解决方案
推荐阅读
- sql - 将 SQL Server 数据库从新版本移动到旧版本
- php - 为什么这段代码没有找到 Key STATUS (PHP)?
- oracle - 在 Oracle 数据库中使用 jpa 和 hibernate 在 spring 中避免对子对象的唯一性约束
- node.js - 将 JSON 对象插入 SQLITE 数据库
- php - 使用 auth 模块在 laravel 中插入的问题
- javascript - 在 JSON 数组中查找一个对象并为其添加一个值
- swift - ExpressibleByStringLiteral 在函数参数中带有选项
- google-apps-script - 托管脚本拒绝在 Chrome 以外的浏览器上连接
- sql - GROUP BY 错误:列“f.path”必须出现在 GROUP BY 子句中或在聚合函数中使用
- javascript - 更新特定表行时出错:jquery.dataTables.js:8149 Uncaught TypeError: Cannot read property 'aoData' of undefined