fix(接口测试): 修复部分接口导出swagger文件报错问题
--bug=1022261 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022261
This commit is contained in:
parent
8118fb9518
commit
fba6283ca9
|
@ -998,6 +998,7 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
|
|
||||||
// 返回code
|
// 返回code
|
||||||
JSONArray statusCode = response.optJSONArray("statusCode");
|
JSONArray statusCode = response.optJSONArray("statusCode");
|
||||||
|
if (statusCode != null) {
|
||||||
for (int i = 0; i < statusCode.length(); i++) {
|
for (int i = 0; i < statusCode.length(); i++) {
|
||||||
JSONObject statusCodeInfo = new JSONObject();
|
JSONObject statusCodeInfo = new JSONObject();
|
||||||
statusCodeInfo.put("headers", headers);
|
statusCodeInfo.put("headers", headers);
|
||||||
|
@ -1011,6 +1012,7 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
responseBody.put(jsonObject.optString("name"), statusCodeInfo);
|
responseBody.put(jsonObject.optString("name"), statusCodeInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return responseBody;
|
return responseBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue