diff --git a/jsonschema2rst/parser.py b/jsonschema2rst/parser.py index e930988..3aa13fe 100644 --- a/jsonschema2rst/parser.py +++ b/jsonschema2rst/parser.py @@ -70,7 +70,7 @@ def schema2rst(schema_file, excluded_key): change_extension(schema_file.name, JSON_EXTENSION))) rst = RST_DIRECTIVES - TreeNode.dict2tree(yaml.load(schema_file), tree, excluded_key) + TreeNode.dict2tree(yaml.full_load(schema_file), tree, excluded_key) rst += _traverse_bfs(tree, _node2rst) return rst diff --git a/jsonschema2rst/tree_node.py b/jsonschema2rst/tree_node.py index 6e33a62..c0ff6fc 100644 --- a/jsonschema2rst/tree_node.py +++ b/jsonschema2rst/tree_node.py @@ -356,7 +356,7 @@ def improve_parent(obj, node): temp.write(response.read()) with open(filename) as temp: - schema = yaml.load(temp) + schema = yaml.full_load(temp) tree = TreeNode("Test_Hep_Schema") TreeNode.dict2tree(schema, tree) print(tree)