11import datetime
22import uuid
33from ipaddress import IPv4Address
4- from typing import Any , Dict , List
4+ from typing import Any , Dict , List , Union
55
66import pytest
77from pydantic import BaseModel
@@ -394,8 +394,8 @@ class ValidateModelForCustomType(BaseModel):
394394 timestampz_ : datetime .datetime
395395 uuid_ : uuid .UUID
396396 inet_ : IPv4Address
397- jsonb_ : Dict [str , List [str ]]
398- json_ : Dict [str , List [str ]]
397+ jsonb_ : Dict [str , List [Union [ str , int ] ]]
398+ json_ : Dict [str , List [Union [ str , int ] ]]
399399
400400 varchar_arr : List [str ]
401401 text_arr : List [str ]
@@ -410,8 +410,8 @@ class ValidateModelForCustomType(BaseModel):
410410 timestampz_arr : List [datetime .datetime ]
411411 uuid_arr : List [uuid .UUID ]
412412 inet_arr : List [IPv4Address ]
413- jsonb_arr : List [ Dict [str , List [str ]]]
414- json_arr : List [ Dict [str , List [str ]]]
413+ jsonb_arr : Dict [str , List [Union [ str , int ]]]
414+ json_arr : Dict [str , List [Union [ str , int ]]]
415415
416416 class TopLevelModel (BaseModel ):
417417 custom_type : ValidateModelForCustomType
0 commit comments