Please introduce slight modification in python distribution, in order to allow json dumps serialization of classes derived from Enum.
for instance, an enum which contains only strings (the same approach is applicable for enum made of int, etc)
from enum import Enum
class PartyIdentifierTypeEnum(Enum):
python 3.11+ would require
from enum import StrEnum
class PartyIdentifierTypeEnum(StrEnum):
while python 3.9+ would require
from enum import Enum
class PartyIdentifierTypeEnum(str, Enum):
the later is a preferred solution imo, since it would be compatible with more configurations. (what's the required python version for using cdm, if any ?)
this is a duplication of https://github.com/finos/common-domain-model/issues/2233, feel free to delete it
Please introduce slight modification in python distribution, in order to allow json
dumps
serialization of classes derived from Enum.for instance, an enum which contains only strings (the same approach is applicable for enum made of int, etc)
python 3.11+ would require
while python 3.9+ would require
the later is a preferred solution imo, since it would be compatible with more configurations. (what's the required python version for using cdm, if any ?)