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
I'm using a combination of flask_smorest (swagger), native dataclasses and marshmallow_dataclass and I can't seem to figure out the syntax make the schema cast to and from native python Enum types when it updates my dataclass ... it always builds my payload at JsonObject instead of str (see below)
@BuiltValueField(wireName: r'sex1') JsonObject? get sex1;
Can you tell me what I'm doing wrong ... I've tried all the following:
I'm using a combination of flask_smorest (swagger), native dataclasses and marshmallow_dataclass and I can't seem to figure out the syntax make the schema cast to and from native python Enum types when it updates my dataclass ... it always builds my payload at JsonObject instead of str (see below)
@BuiltValueField(wireName: r'sex1') JsonObject? get sex1;
Can you tell me what I'm doing wrong ... I've tried all the following:
@unique
class Sex(IntEnum):
`class _SexSerialized(fields.Field):
"""Field that serializes to a string of sex name"""
SexSerializedMsg = NewType("SexSerialized", Sex, field=fields.Enum)
@DataClass()
class PersonRowMsg():
sex1: Sex = Sex.UNKNOWN
sex2: _SexSerialized = field()
sex3: SexSerializedMsg = field()
`
The text was updated successfully, but these errors were encountered: