Example lexicon:
"tags": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"maxLength": 25,
"description": "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"
}
}
Actual behavior:
tags: t.Optional[t.List[str]] = None
Expected behavior:
tags: t.Optional[t.List[constr(max_length=25)]] = None
So the constraints of the array must be provided using constr. The issue comes that for today we describe constraints only using Field(). Found in #503
More about constr: https://docs.pydantic.dev/1.10/usage/types/#arguments-to-constr
That's how we do it today for non-inner type:
limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit.
Example lexicon:
Actual behavior:
Expected behavior:
So the constraints of the array must be provided using
constr. The issue comes that for today we describe constraints only usingField(). Found in #503More about
constr: https://docs.pydantic.dev/1.10/usage/types/#arguments-to-constrThat's how we do it today for non-inner type: