Skip to content

Commit

Permalink
Import detection for list models
Browse files Browse the repository at this point in the history
  • Loading branch information
ehooo committed Sep 23, 2024
1 parent 7b2a7fd commit 8340802
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lima_api/code_generator/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ def process_schema(self, schema_name: str, schema_data: dict) -> SchemaObject:
obj = self.get_ref(items.get("$ref"))
self.models.add(obj.name)
self.models.update(obj.models)
new_schema.enums.update(obj.enums)
new_schema.models.update(obj.models)
new_schema.set_as_alias(f"list[{obj.name}]")
elif "anyOf" in items:
obj = self.process_schema(schema_name, items)
Expand Down

0 comments on commit 8340802

Please sign in to comment.