fix(接口测试): 修复json切换jsonSchema时null值被处理成空串的缺陷

--bug=1019350
--user=王孝刚
[接口测试]github#19439接口配置中,当请求体由json切换为jsonschema时,null值被理成造成接口调用失败
https://www.tapd.cn/55049933/s/1291697
This commit is contained in:
wxg0103 2022-11-08 11:23:40 +08:00 committed by wxg0103
parent b818bfdb25
commit 7344dbc3b8
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ class Convert {
objectTemplate.type = "string"; objectTemplate.type = "string";
} else if (isNull(value)) { } else if (isNull(value)) {
objectTemplate.type = "string"; objectTemplate.type = "string";
objectTemplate.mock = { mock: ''};
} else if (isArray(value)) { } else if (isArray(value)) {
objectTemplate.type = "array"; objectTemplate.type = "array";
objectTemplate["mock"] = undefined; objectTemplate["mock"] = undefined;