Skip to content

Commit

Permalink
fix: Fix _get_definition_references calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 24, 2024
1 parent d3aa9c8 commit 5f507dc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _get_definition_references(schema, defn, parents=None, project_schema=None,
defn,
[*parents, key, "0"],
project_schema,
include_nested,
include_nested=include_nested,
)
)
elif "$ref" in value:
Expand All @@ -168,17 +168,21 @@ def _get_definition_references(schema, defn, parents=None, project_schema=None,
defn,
[*parents, key],
project_schema,
include_nested,
include_nested=include_nested,
)
)
elif "properties" in value:
references.extend(
_get_definition_references(value, defn, [*parents, key], project_schema, include_nested)
_get_definition_references(
value, defn, [*parents, key], project_schema, include_nested=include_nested
)
)

if "definitions" in schema:
for key, value in schema["definitions"].items():
references.extend(_get_definition_references(value, defn, [key], project_schema, include_nested))
references.extend(
_get_definition_references(value, defn, [key], project_schema, include_nested=include_nested)
)

return references

Expand Down

0 comments on commit 5f507dc

Please sign in to comment.