From e0761b9ac0d51baccf84e752d108686d5e0474c0 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 19 May 2022 10:08:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DAPI=20CASE=E8=AF=B7=E6=B1=82=E4=BD=93JSON-SCH?= =?UTF-8?q?EMA=E6=89=93=E5=BC=80-=E5=85=B3=E9=97=AD=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=A5=BD=E7=9A=84=E8=AF=B7=E6=B1=82=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=8F=91=E7=94=9F=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013277 --user=赵勇 【接口测试】github#13712,API CASE或者自动化场景请求体JSON-SCHEMA打开-关闭导致编辑好的请求内容发生变化 https://www.tapd.cn/55049933/s/1160261 --- .../components/api/definition/components/body/ApiBody.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/api/definition/components/body/ApiBody.vue b/frontend/src/business/components/api/definition/components/body/ApiBody.vue index fb7b15fbc2..71e0a8b637 100644 --- a/frontend/src/business/components/api/definition/components/body/ApiBody.vue +++ b/frontend/src/business/components/api/definition/components/body/ApiBody.vue @@ -139,12 +139,12 @@ export default { this.reloadCodeEdit(); }, 'body.raw'() { - if (this.body.format !== 'JSON-SCHEMA' && this.body.raw && !this.body.jsonSchema) { + if (this.body.format !== 'JSON-SCHEMA' && this.body.raw) { try { const MsConvert = new Convert(); let data = MsConvert.format(JSON.parse(this.body.raw)); if (this.body.jsonSchema) { - this.body.jsonSchema = this.deepAssign(data); + this.body.jsonSchema = this.deepAssign(this.body.jsonSchema, data); } else { this.body.jsonSchema = data; }