fix(接口测试): 修复API CASE请求体JSON-SCHEMA打开-关闭导致编辑好的请求内容发生变化
--bug=1013277 --user=赵勇 【接口测试】github#13712,API CASE或者自动化场景请求体JSON-SCHEMA打开-关闭导致编辑好的请求内容发生变化 https://www.tapd.cn/55049933/s/1160261
This commit is contained in:
parent
099bf1f295
commit
e0761b9ac0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue