removing logs and preping new version

This commit is contained in:
João Moura
2024-02-28 03:43:36 -03:00
parent 6d23dc6ad7
commit ebc611740f
5 changed files with 193 additions and 132 deletions

View File

@@ -27,7 +27,9 @@ class PydanticSchemaParser(BaseModel):
field_type = field.annotation
if get_origin(field_type) is list:
list_item_type = get_args(field_type)[0]
if issubclass(list_item_type, BaseModel):
if isinstance(list_item_type, type) and issubclass(
list_item_type, BaseModel
):
nested_schema = self._get_model_schema(list_item_type, depth + 1)
return f"List[\n{nested_schema}\n{' ' * 4 * depth}]"
else: