We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b013093 commit 1dd1efeCopy full SHA for 1dd1efe
openapi_python_client/parser/properties/__init__.py
@@ -120,10 +120,18 @@ def _property_from_ref(
120
schemas,
121
)
122
123
- default = existing.convert_value(parent.default) if parent is not None else None
124
- if isinstance(default, PropertyError):
125
- default.data = parent or data
126
- return default, schemas
+ if hasattr(data, 'default'):
+ default = existing.convert_value(data.default)
+ if isinstance(default, PropertyError):
+ default.data = data
127
+ return default, schemas
128
+ elif parent is not None:
129
+ default = existing.convert_value(parent.default)
130
131
+ default.data = parent
132
133
+ else:
134
+ default = None
135
136
prop = evolve(
137
existing,
0 commit comments