fix(接口测试): github#13037Swagger2.0的脚本导入到MS后,响应内容状态码显示错误
--bug=1012802 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001012802
This commit is contained in:
parent
29a6d9bcc6
commit
d049431f26
|
@ -265,7 +265,11 @@ public class Swagger2Parser extends SwaggerAbstractParser {
|
|||
msResponse.setStatusCode(new ArrayList<>());
|
||||
if (responses != null && responses.size() > 0) {
|
||||
responses.forEach((responseCode, response) -> {
|
||||
msResponse.getStatusCode().add(new KeyValue(responseCode, responseCode));
|
||||
if(StringUtils.isNotBlank(response.getDescription())){
|
||||
msResponse.getStatusCode().add(new KeyValue(responseCode, response.getDescription()));
|
||||
}else{
|
||||
msResponse.getStatusCode().add(new KeyValue(responseCode, responseCode));
|
||||
}
|
||||
if (responseCode.equals("200")&&response.getResponseSchema()!=null) {
|
||||
parseResponseBody(response.getResponseSchema(),msResponse.getBody());
|
||||
msResponse.getBody().setFormat("JSON-SCHEMA");
|
||||
|
|
Loading…
Reference in New Issue