From fde6ae766c08eac21e48fe6a103d653a903abdee Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 3 Dec 2020 16:27:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20swagger=20=E5=AF=BC=E5=85=A5=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/parse/{ => old}/ApiImportAbstractParser.java | 2 +- .../io/metersphere/api/parse/{ => old}/ApiImportParser.java | 2 +- .../api/parse/{ => old}/ApiImportParserFactory.java | 2 +- .../api/parse/{ => old}/JmeterDocumentParser.java | 2 +- .../java/io/metersphere/api/parse/{ => old}/MsParser.java | 2 +- .../io/metersphere/api/parse/{ => old}/PostmanParser.java | 2 +- .../io/metersphere/api/parse/{ => old}/Swagger2Parser.java | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/ApiImportAbstractParser.java (98%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/ApiImportParser.java (91%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/ApiImportParserFactory.java (94%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/JmeterDocumentParser.java (99%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/MsParser.java (99%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/PostmanParser.java (99%) rename backend/src/main/java/io/metersphere/api/parse/{ => old}/Swagger2Parser.java (98%) diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportAbstractParser.java similarity index 98% rename from backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java rename to backend/src/main/java/io/metersphere/api/parse/old/ApiImportAbstractParser.java index a8c450c6aa..ac18f2a75a 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportAbstractParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportAbstractParser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.scenario.KeyValue; diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportParser.java b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportParser.java similarity index 91% rename from backend/src/main/java/io/metersphere/api/parse/ApiImportParser.java rename to backend/src/main/java/io/metersphere/api/parse/old/ApiImportParser.java index 6173f71c77..edc1c47908 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportParser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import io.metersphere.api.dto.ApiTestImportRequest; import io.metersphere.api.dto.definition.parse.ApiDefinitionImport; diff --git a/backend/src/main/java/io/metersphere/api/parse/ApiImportParserFactory.java b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportParserFactory.java similarity index 94% rename from backend/src/main/java/io/metersphere/api/parse/ApiImportParserFactory.java rename to backend/src/main/java/io/metersphere/api/parse/old/ApiImportParserFactory.java index ee41450068..6235617a83 100644 --- a/backend/src/main/java/io/metersphere/api/parse/ApiImportParserFactory.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/ApiImportParserFactory.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import io.metersphere.commons.constants.ApiImportPlatform; import org.apache.commons.lang3.StringUtils; diff --git a/backend/src/main/java/io/metersphere/api/parse/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java similarity index 99% rename from backend/src/main/java/io/metersphere/api/parse/JmeterDocumentParser.java rename to backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java index 4acf7f5690..c648df516b 100644 --- a/backend/src/main/java/io/metersphere/api/parse/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/JmeterDocumentParser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import io.metersphere.commons.utils.LogUtil; import io.metersphere.commons.utils.ScriptEngineUtils; diff --git a/backend/src/main/java/io/metersphere/api/parse/MsParser.java b/backend/src/main/java/io/metersphere/api/parse/old/MsParser.java similarity index 99% rename from backend/src/main/java/io/metersphere/api/parse/MsParser.java rename to backend/src/main/java/io/metersphere/api/parse/old/MsParser.java index c9d165e247..5ec129288c 100644 --- a/backend/src/main/java/io/metersphere/api/parse/MsParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/MsParser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; diff --git a/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java b/backend/src/main/java/io/metersphere/api/parse/old/PostmanParser.java similarity index 99% rename from backend/src/main/java/io/metersphere/api/parse/PostmanParser.java rename to backend/src/main/java/io/metersphere/api/parse/old/PostmanParser.java index e8eed52279..aba9b3199a 100644 --- a/backend/src/main/java/io/metersphere/api/parse/PostmanParser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/PostmanParser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; diff --git a/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java b/backend/src/main/java/io/metersphere/api/parse/old/Swagger2Parser.java similarity index 98% rename from backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java rename to backend/src/main/java/io/metersphere/api/parse/old/Swagger2Parser.java index f16c220364..5aaac94a95 100644 --- a/backend/src/main/java/io/metersphere/api/parse/Swagger2Parser.java +++ b/backend/src/main/java/io/metersphere/api/parse/old/Swagger2Parser.java @@ -1,4 +1,4 @@ -package io.metersphere.api.parse; +package io.metersphere.api.parse.old; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; @@ -79,8 +79,8 @@ public class Swagger2Parser extends ApiImportAbstractParser { headerManager.setId(UUID.randomUUID().toString()); headerManager.setName(res.getName() + "Postman MsHeaderManager"); headerManager.setHeaders(res.getHeaders()); - HashTree tree = new HashTree(); - tree.add(headerManager); +// HashTree tree = new HashTree(); +// tree.add(headerManager); LinkedList list = new LinkedList<>(); list.add(headerManager); requestElement.setHashTree(list);