Skip to content

Commit

Permalink
Fix mapping path too many pops
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Nov 1, 2023
1 parent dc479f1 commit 56449d5
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ def traverse(
print(mapping_path)

if "properties" in schema_dictionary.keys():
# mapping_path.append("properties")
mapping_path[-1] = f"{mapping_path[-1]}/properties"
schema_dictionary = schema_dictionary["properties"]

elif "items" in schema_dictionary.keys():
# mapping_path.append("items")
mapping_path[-1] = f"{mapping_path[-1]}/items"
schema_dictionary = schema_dictionary["items"]
if "properties" in schema_dictionary.keys():
# mapping_path.append("properties")
mapping_path[-1] = f"{mapping_path[-1]}/properties"
schema_dictionary = schema_dictionary["properties"]

for configuration_dictionary_key, configuration_dictionary_value in (
Expand Down Expand Up @@ -150,9 +150,8 @@ def traverse(
element,
mapping_path
)
mapping_path.pop()

mapping_path = []
mapping_path = ["tree"]

traverse(schema_dictionary, configuration_dictionary, mapping_path)

Expand Down

0 comments on commit 56449d5

Please sign in to comment.