Merge pull request #6425 from dataease/pr@dev@fixds

fix: 解析API数据结构
This commit is contained in:
taojinlong 2023-10-30 02:39:08 -05:00 committed by GitHub
commit 54488bd163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,7 +281,7 @@ public class ApiProvider extends Provider {
JSONArray jsonArray = jsonObject.getJSONArray(s);
List<JSONObject> childrenField = new ArrayList<>();
for (Object object : jsonArray) {
handleStr(apiDefinition, JSON.toJSONString(object, SerializerFeature.WriteMapNullValue), childrenField, rootPath + "." + s + "[*]");
handleStr(apiDefinition, JSON.toJSONString(object, SerializerFeature.WriteMapNullValue), childrenField, rootPath + "." + String.format(path, s) + "[*]");
}
o.put("children", childrenField);
o.put("childrenDataType", "LIST");