-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.
Description
For example,
MyNamedUnion = Union["UnionModel1", "UnionModel2"]
class ModelWithNamedUnionProperty(Model):
named_union: "MyNamedUnion" = rest_field(name="namedUnion")
class UnionModel1(Model):
prop1: int = rest_field()
class UnionModel2(Model):
prop2: int = rest_field()
test = ModelWithNamedUnionProperty({"namedUnion": {"prop1": 1}})
currently, test.named_union is a raw dict, the MyNamedUnion typing is not handled correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.