You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first clause of the to_dict method uses elif instead of if when a model's required property is a oneOf or anyOf union with primitive-type members ordered before object-type members, resulting in a syntax error.
In the mean time, a workaround may be to sort primitive-type members below object-type members as long as each group's members has their ordering maintained among themselves.
The first clause of the
to_dict
method useselif
instead ofif
when a model's required property is aoneOf
oranyOf
union with primitive-type members ordered before object-type members, resulting in a syntax error.In the mean time, a workaround may be to sort primitive-type members below object-type members as long as each group's members has their ordering maintained among themselves.
Source of issue:
openapi-python-client/openapi_python_client/templates/property_templates/union_property.py.jinja
Lines 69 to 72 in e1a8b24
Resulting error:
Using an example
schema-required-union-ordering.yaml
file:The problematic
schema_required_union_ordering_client/models/get_response_200.py
file:Versions
3.7.12
0.11.1
The text was updated successfully, but these errors were encountered: