Open sahuguet opened 4 years ago
You could do something like:
class PropulsionType(Enum):
COMBUSTION = "combustion"
ELECTRIC = "electric"
...
@dataclass
class SomeObject(JsonSchemaMixin):
propulsion_type: List[PropulsionType]
Currently, it's not possible to specify the minItems
requirement though. I might need to add this as one of the possible metadata fields that you can specify so that you could do the following:
@dataclass
class SomeObject(JsonSchemaMixin):
propulsion_type: List[PropulsionType] = field(metadata=JsonSchemaMeta(min_items=1))
Hi,
I am trying to generate something like this
Is it something that can be implemented using dataclasses-jsonschema?