From da7c2aefd63a66b70c245b7fef2b39ded4e976cc Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 7 Nov 2022 18:23:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E5=AF=BC=E5=85=A5postman?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B2=A1=E6=9C=89body=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001019477 --user=郭雨琦 --- .../io/metersphere/api/parse/PostmanAbstractParserParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java index 336d7d8115..c7d5d041cb 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java @@ -34,7 +34,7 @@ public abstract class PostmanAbstractParserParser extends ApiImportAbstractPa requestDesc.getAuth(); // todo 认证方式等待优化 PostmanUrl url = requestDesc.getUrl(); MsHTTPSamplerProxy request = buildRequest(requestItem.getName(), url == null ? StringUtils.EMPTY : url.getRaw(), requestDesc.getMethod(), - requestDesc.getBody().get("jsonSchema") == null ? StringUtils.EMPTY : requestDesc.getBody().get("jsonSchema").textValue()); + (requestDesc.getBody() == null || requestDesc.getBody().get("jsonSchema") == null)? StringUtils.EMPTY : requestDesc.getBody().get("jsonSchema").textValue()); request.setRest(parseKeyValue(requestDesc.getUrl().getVariable())); if (StringUtils.isNotBlank(request.getPath())) { String path = request.getPath().split("\\?")[0];