-
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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]] = NoneExpected behavior:
tags: t.Optional[t.List[constr(max_length=25)]] = NoneSo 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.Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working