fix(接口测试): 导出swagger再导入其他平台缺少值
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016562
This commit is contained in:
parent
6f7a06ebd4
commit
0a35673ad1
|
@ -684,14 +684,9 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
swaggerParam.setName((String) param.get("name"));
|
||||
swaggerParam.setRequired((boolean) param.get("required"));
|
||||
swaggerParam.setExample((String) param.get("value"));
|
||||
// 请求头 value 没有导出
|
||||
// JSONObject schema = new JSONObject();
|
||||
// swaggerParam.setSchema(schema);
|
||||
// if(type.equals("headers")) {
|
||||
// schema.put("type", "string");
|
||||
// schema.put("example", param.getString("value"));
|
||||
// swaggerParam.setSchema(schema);
|
||||
// }
|
||||
JSONObject schema = new JSONObject();
|
||||
schema.put("type", "string");
|
||||
swaggerParam.setSchema(schema);
|
||||
paramsList.add(JSON.parseObject(JSON.toJSONString(swaggerParam), Feature.DisableSpecialKeyDetect));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue