fix(接口测试): 修复swagger导出失败问题
--bug=1021484 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001021484&from=worktable_title
This commit is contained in:
parent
c5547e5228
commit
c6f4030955
|
@ -1004,9 +1004,12 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
statusCodeInfo.put("content", buildContent(response));
|
||||
statusCodeInfo.put("description", StringUtils.EMPTY);
|
||||
JSONObject jsonObject = statusCode.getJSONObject(i);
|
||||
jsonObject.get("name");
|
||||
statusCodeInfo.put("description", jsonObject.get("value"));
|
||||
responseBody.put(jsonObject.get("name").toString(), statusCodeInfo);
|
||||
if (jsonObject.optString("value") != null) {
|
||||
statusCodeInfo.put("description", jsonObject.optString("value"));
|
||||
}
|
||||
if (jsonObject.optString("name") != null) {
|
||||
responseBody.put(jsonObject.optString("name"), statusCodeInfo);
|
||||
}
|
||||
}
|
||||
return responseBody;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue