From 2585ccaaa3a36f706cc06ff301d859bfba6fb159 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 20 Mar 2024 16:55:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=92=8C=E8=AF=B7=E6=B1=82=E4=BD=93=E5=86=85=E5=AE=B9=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037330 --user=王孝刚 【接口测试】接口定义-创建api-调试结果中请求体内容和实际不一致 https://www.tapd.cn/55049933/s/1478115 --- .../main/java/io/metersphere/api/parser/api/Swagger3Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java index 4a6a0d4cec..e77d127b3a 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java @@ -278,7 +278,7 @@ public class Swagger3Parser implements ImportParser { body.setBodyType(Body.BodyType.JSON.name()); JsonBody jsonBody = new JsonBody(); jsonBody.setJsonSchema(jsonSchemaItem); - jsonBody.setEnableJsonSchema(true); + jsonBody.setEnableJsonSchema(false); if (ObjectUtils.isNotEmpty(value.getExample())) { jsonBody.setJsonValue(ApiDataUtils.toJSONString(value.getExample())); }