fix(接口定义): 倒入Swagger提示解析出错
--bug=1009120 --user=郭雨琦 【ID1009120】【接口定义】倒入Swagger提示解析出错
This commit is contained in:
parent
4c0b392c1b
commit
1796b3473a
|
@ -246,8 +246,8 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
msResponse.setType(RequestType.HTTP);
|
msResponse.setType(RequestType.HTTP);
|
||||||
// todo 状态码要调整?
|
// todo 状态码要调整?
|
||||||
msResponse.setStatusCode(new ArrayList<>());
|
msResponse.setStatusCode(new ArrayList<>());
|
||||||
ApiResponse apiResponse = responses.get("200");
|
|
||||||
if (responses != null) {
|
if (responses != null) {
|
||||||
|
ApiResponse apiResponse = responses.get("200");
|
||||||
if (apiResponse == null) {
|
if (apiResponse == null) {
|
||||||
responses.forEach((responseCode, response) -> {
|
responses.forEach((responseCode, response) -> {
|
||||||
parseResponseHeader(response, msResponse.getHeaders());
|
parseResponseHeader(response, msResponse.getHeaders());
|
||||||
|
@ -257,10 +257,10 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
||||||
parseResponseHeader(apiResponse, msResponse.getHeaders());
|
parseResponseHeader(apiResponse, msResponse.getHeaders());
|
||||||
parseResponseBody(apiResponse, msResponse.getBody());
|
parseResponseBody(apiResponse, msResponse.getBody());
|
||||||
}
|
}
|
||||||
|
responses.forEach((responseCode, response) -> {
|
||||||
|
parseResponseCode(msResponse.getStatusCode(), responseCode, response);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
responses.forEach((responseCode, response) -> {
|
|
||||||
parseResponseCode(msResponse.getStatusCode(), responseCode, response);
|
|
||||||
});
|
|
||||||
return msResponse;
|
return msResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue