Closed ZdenekM closed 5 years ago
The following definition:
@dataclass class Parameter(JsonSchemaMixin): id: str type: ParameterTypeEnum value: Any
leads to schema like this:
{'type': 'object', 'required': ['id', 'type', 'value'], 'properties': {'id': {'type': 'string'}, 'type': {'type': 'string', 'enum': ['string', 'double']}, 'value': {'type': 'object'}}}
But I would rather see:
{'type': 'object', 'required': ['id', 'type', 'value'], 'properties': {'id': {'type': 'string'}, 'type': {'type': 'string', 'enum': ['string', 'double']}, 'value': {}}}
...where type for value is ommited, which means that value could be data of any type (string or number in this case). Is there a way how to achieve it? Many thanks.
type
value
Great, thanks!
The following definition:
leads to schema like this:
But I would rather see:
...where
type
forvalue
is ommited, which means thatvalue
could be data of any type (string or number in this case). Is there a way how to achieve it? Many thanks.