Closed
Description
Hi @tobyzerner ! Today I was wondering how to define a field of a specific type like Str
, Integer
, Date
, ... that accepts multiple values.
In JSON Schema it could be described as this for e.g. an array of 1-10 values, each one a string from 1-255 characters:
{
"type": "object",
"properties": {
"tags": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": { // This part can already be defined using the built-in `Str`, `Integer`, etc classes
"type": "string",
"minLength": "1",
"maxLength": "255"
}
}
}
}
Valid value for the example:
{
"tags": [
"tag_1",
"tag_2"
]
}
Invalid examples:
{
"tags": "tag_1"
}
{
"tags": [
"tag_1",
1000,
false
]
}
Do you plan to support fields like this in the future? Or do you maybe already have a solution for this that I'm overlooking?