提交 0952b270 编写于 作者: Q q4speed

fix(接口测试): 修复浏览器插件录制的脚本导入到测试平台后,接口顺序发生变化的bug

Closes #396
上级 18c300f8
......@@ -3,6 +3,7 @@ package io.metersphere.api.parse;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.parser.Feature;
import io.metersphere.api.dto.ApiTestImportRequest;
import io.metersphere.api.dto.parse.ApiImport;
import io.metersphere.api.dto.scenario.request.RequestType;
......@@ -23,7 +24,7 @@ public class MsParser extends ApiImportAbstractParser {
}
private String parsePluginFormat(String testStr) {
JSONObject testObject = JSONObject.parseObject(testStr);
JSONObject testObject = JSONObject.parseObject(testStr, Feature.OrderedField);
if (testObject.get("scenarios") != null) {
return testStr;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册