Merge pull request #8162 from dataease/pr@dev@fixdataset

fix(数据集): 创建API数据集无数据
This commit is contained in:
taojinlong 2024-02-26 17:36:08 +08:00 committed by GitHub
commit d2b99aee59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -274,6 +274,7 @@ public class ApiProvider extends Provider {
static private void handleStr(ApiDefinition apiDefinition, String jsonStr, List<JSONObject> fields, String rootPath) {
if (jsonStr.startsWith("[")) {
rootPath = rootPath + "[*]";
JSONArray jsonArray = JSONObject.parseArray(jsonStr);
for (Object o : jsonArray) {
handleStr(apiDefinition, o.toString(), fields, rootPath);