From 8eb763de0335441780ac3cb0545a2c662e666453 Mon Sep 17 00:00:00 2001 From: zhangdahai112 Date: Mon, 6 Dec 2021 13:37:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20=E3=80=90github#815?= =?UTF-8?q?1=E3=80=91=E4=BD=BF=E7=94=A8=20postman=20=E6=88=96=E8=80=85=20i?= =?UTF-8?q?dea=20=E6=8F=92=E4=BB=B6=E5=AF=BC=E5=85=A5=E6=97=B6=EF=BC=8Cpat?= =?UTF-8?q?hvariable=20=E6=97=A0=E6=B3=95=E8=87=AA=E5=B8=A6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=88=B0=20rest=E5=8F=82=E6=95=B0=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/dto/parse/postman/PostmanUrl.java | 1 + .../io/metersphere/api/parse/PostmanAbstractParserParser.java | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/dto/parse/postman/PostmanUrl.java b/backend/src/main/java/io/metersphere/api/dto/parse/postman/PostmanUrl.java index 55481b4b12..aead1899ff 100644 --- a/backend/src/main/java/io/metersphere/api/dto/parse/postman/PostmanUrl.java +++ b/backend/src/main/java/io/metersphere/api/dto/parse/postman/PostmanUrl.java @@ -11,4 +11,5 @@ public class PostmanUrl { private String protocol; private String port; private List query; + private List variable; } diff --git a/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java b/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java index 4a48319285..a8d95dc9ed 100644 --- a/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/PostmanAbstractParserParser.java @@ -31,6 +31,7 @@ public abstract class PostmanAbstractParserParser extends ApiImportAbstractPa requestDesc.getAuth(); // todo 认证方式等待优化 PostmanUrl url = requestDesc.getUrl(); MsHTTPSamplerProxy request = buildRequest(requestItem.getName(), url == null ? "" : url.getRaw(), requestDesc.getMethod()); + request.setRest(parseKeyValue(requestDesc.getUrl().getVariable())); if (StringUtils.isNotBlank(request.getPath())) { String path = request.getPath().split("\\?")[0]; path = parseVariable(path);