Skip to content

Commit

Permalink
Produce a result without defs
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Oct 30, 2023
1 parent aa043cf commit 42f92f7
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1,693 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,14 @@ def resolve_schema(schema_directory_path) -> dict:
json_file_name_dictionary["opentelemetry_configuration.json"]
)

def remove_defs(dictionary):
if "$defs" in dictionary.keys():
dictionary.pop("$defs")

for key, value in dictionary.items():
if isinstance(value, dict):
remove_defs(value)

remove_defs(result)

return result
Loading

0 comments on commit 42f92f7

Please sign in to comment.