dataclasses-jsonschema
dataclasses-jsonschema copied to clipboard
Support literal types with enum members
The following is not currently supported which is valid according to PEP-586
class Color(Enum):
RED,
GREEN,
BLUE,
PURPLE
@dataclass
class ColorInfo(JsonSchemaMixin):
primary_color: Literal[Color.RED, Color.GREEN, Color.BLUE]
...