Merge pull request #533 from pypeclub/feature/schema_type_represent_one_schema

Schema type represents one schema
This commit is contained in:
Milan Kolar 2020-09-22 09:42:42 +02:00 committed by GitHub
commit 5f87cbdeb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 19 deletions

View file

@ -27,10 +27,7 @@
```
{
"type": "schema",
"children": [
"my_schema_name",
"my_other_schema_name"
]
"name": "my_schema_name"
}
```

View file

@ -22,9 +22,7 @@
"children": [
{
"type": "schema",
"children": [
"1_plugins_gui_schema"
]
"name": "1_plugins_gui_schema"
}
]
}

View file

@ -7,12 +7,16 @@
"key": "global",
"children": [{
"type": "schema",
"children": [
"1_tray_items",
"1_applications_gui_schema",
"1_tools_gui_schema",
"1_intents_gui_schema"
]
"name": "1_tray_items"
}, {
"type": "schema",
"name": "1_applications_gui_schema"
}, {
"type": "schema",
"name": "1_tools_gui_schema"
}, {
"type": "schema",
"name": "1_intents_gui_schema"
}]
}, {
"type": "dict-invisible",
@ -29,6 +33,9 @@
"label": "Muster - Templates mapping",
"is_file": true
}]
}, {
"type": "schema",
"name": "1_examples"
}
]
}

View file

@ -69,12 +69,11 @@ def _fill_inner_schemas(schema_data, schema_collection):
new_children.append(new_child)
continue
for schema_name in child["children"]:
new_child = _fill_inner_schemas(
schema_collection[schema_name],
schema_collection
)
new_children.append(new_child)
new_child = _fill_inner_schemas(
schema_collection[child["name"]],
schema_collection
)
new_children.append(new_child)
schema_data["children"] = new_children
return schema_data