diff --git a/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java b/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java index ddeb5d9698..7bab3ae75f 100644 --- a/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java +++ b/backend/src/main/java/io/metersphere/api/dto/scenario/Body.java @@ -2,6 +2,7 @@ package io.metersphere.api.dto.scenario; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.parser.Feature; import com.alibaba.fastjson.serializer.SerializerFeature; import io.metersphere.api.dto.scenario.request.BodyFile; import io.metersphere.commons.json.JSONSchemaRunTest; @@ -96,7 +97,7 @@ public class Body { } else { try { if (StringUtils.isNotEmpty(this.getRaw())) { - JSONObject jsonObject = JSON.parseObject(this.getRaw()); + JSONObject jsonObject = JSON.parseObject(this.getRaw(), Feature.OrderedField); if (!this.getRaw().contains("$ref")) { jsonMockParse(jsonObject); } diff --git a/frontend/src/business/components/common/json-schema/schema/editor/main.vue b/frontend/src/business/components/common/json-schema/schema/editor/main.vue index ce36842790..936028acb4 100644 --- a/frontend/src/business/components/common/json-schema/schema/editor/main.vue +++ b/frontend/src/business/components/common/json-schema/schema/editor/main.vue @@ -207,7 +207,7 @@ export default { }, created() { if (this.pickValue) { - this.hidden = this.pickValue.hidden; + this.hidden = this.root ? false : this.pickValue.hidden; } }, methods: {