Skip to content

Commit a5d8be4

Browse files
p1-alexandrevaneyNementon
authored andcommitted
fix build_schema bug when model points to loaded ref
1 parent d0a2e6e commit a5d8be4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,11 +811,8 @@ def build_schemas(*, components: Dict[str, Union[oai.Reference, oai.Schema]]) ->
811811
visited.append(name)
812812

813813
if isinstance(data, oai.Reference):
814-
class_name = _reference_model_name(data)
815-
816-
if not schemas.models.get(class_name) and not schemas.enums.get(class_name):
817-
references_by_name[name] = data
818-
references_to_process.append((name, data))
814+
references_by_name[name] = data
815+
references_to_process.append((name, data))
819816
continue
820817

821818
schemas_or_err = update_schemas_with_data(name, data, schemas, lazy_self_references)

0 commit comments

Comments
 (0)