Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeTux committed Jul 20, 2023
1 parent 4938b26 commit 4fcf73a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/v21/json_schema_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ def _parse_as_object(name: str, parent: SubSchema, schema: Schema) -> Object:
type = Number.from_sub_schema(sub_schema)
elif is_array(sub_schema):
if contains_reference(sub_schema["items"]):
_name = (
sub_schema["items"]["$ref"]
.split("/")[-1]
.removesuffix("Type")
.removesuffix("Enum")
)
_name = sub_schema["items"]["$ref"].split("/")[-1]
if _name.endswith("Enum"):
_name = _name[:-4]
if _name.endswith("Type"):
_name = _name[:-4]

sub_schema = resolve_reference(sub_schema["items"]["$ref"], schema)
if is_object(sub_schema):
Expand Down

0 comments on commit 4fcf73a

Please sign in to comment.