Merge pull request #8162 from dataease/pr@dev@fixdataset
fix(数据集): 创建API数据集无数据
This commit is contained in:
commit
d2b99aee59
@ -274,6 +274,7 @@ public class ApiProvider extends Provider {
|
|||||||
|
|
||||||
static private void handleStr(ApiDefinition apiDefinition, String jsonStr, List<JSONObject> fields, String rootPath) {
|
static private void handleStr(ApiDefinition apiDefinition, String jsonStr, List<JSONObject> fields, String rootPath) {
|
||||||
if (jsonStr.startsWith("[")) {
|
if (jsonStr.startsWith("[")) {
|
||||||
|
rootPath = rootPath + "[*]";
|
||||||
JSONArray jsonArray = JSONObject.parseArray(jsonStr);
|
JSONArray jsonArray = JSONObject.parseArray(jsonStr);
|
||||||
for (Object o : jsonArray) {
|
for (Object o : jsonArray) {
|
||||||
handleStr(apiDefinition, o.toString(), fields, rootPath);
|
handleStr(apiDefinition, o.toString(), fields, rootPath);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user