File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
openapi_python_client/parser/properties Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -120,10 +120,18 @@ def _property_from_ref(
120
120
schemas ,
121
121
)
122
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
123
+ if hasattr (data , 'default' ):
124
+ default = existing .convert_value (data .default )
125
+ if isinstance (default , PropertyError ):
126
+ default .data = data
127
+ return default , schemas
128
+ elif parent is not None :
129
+ default = existing .convert_value (parent .default )
130
+ if isinstance (default , PropertyError ):
131
+ default .data = parent
132
+ return default , schemas
133
+ else :
134
+ default = None
127
135
128
136
prop = evolve (
129
137
existing ,
You can’t perform that action at this time.
0 commit comments