fix(IDEA插件): 修复新版本插件导入报错
This commit is contained in:
parent
45721d1007
commit
f60215c6fd
|
@ -2,6 +2,7 @@ package io.metersphere.api.parse;
|
|||
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.node.NullNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import io.metersphere.api.dto.definition.request.sampler.MsHTTPSamplerProxy;
|
||||
import io.metersphere.api.dto.definition.response.HttpResponse;
|
||||
|
@ -146,7 +147,7 @@ public abstract class PostmanAbstractParserParser<T> extends ApiImportAbstractPa
|
|||
if (StringUtils.equals(bodyMode, PostmanRequestBodyMode.RAW.value())) {
|
||||
parseRawBody(body, postmanBody, bodyMode);
|
||||
} else if (StringUtils.equalsAny(bodyMode, PostmanRequestBodyMode.FORM_DATA.value(), PostmanRequestBodyMode.URLENCODED.value())) {
|
||||
String s1 = postmanBody.get(bodyMode).toString();
|
||||
String s1 = Optional.ofNullable(postmanBody.get(bodyMode)).orElse(NullNode.getInstance()).toString();
|
||||
String s = parseVariable(s1);
|
||||
List<PostmanKeyValue> postmanKeyValues = JSON.parseArray(s, PostmanKeyValue.class);
|
||||
body.setKvs(parseKeyValue(postmanKeyValues));
|
||||
|
|
|
@ -1350,7 +1350,7 @@ public class ApiDefinitionService {
|
|||
|
||||
if (exApiRequest.get("body") != null && apiRequest.get("body") != null) {
|
||||
if (!StringUtils.equals(exApiRequest.get("body").toString(), apiRequest.get("body").toString())) {
|
||||
if (apiSyncCaseRequest.getBody() && toUpdate) {
|
||||
if (BooleanUtils.toBoolean(apiSyncCaseRequest.getBody()) && toUpdate) {
|
||||
apiDefinition.setToBeUpdated(true);
|
||||
apiDefinition.setToBeUpdateTime(System.currentTimeMillis());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue