You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using List[Annotated[Union]] field with discriminator, its value appears in location tuple
Error i get
{
'input': '654f',
'loc': ('h', 'g', 0, 'c-discriminator', 'e', 'a'),
'msg': 'Input should be a valid integer, unable to parse string as an integer',
'type': 'int_parsing',
'url': 'https://errors.pydantic.dev/2.3/v/int_parsing'
}
Expected error
{
'input': '654f',
'loc': ('h', 'g', 0, 'e', 'a'),
'msg': 'Input should be a valid integer, unable to parse string as an integer',
'type': 'int_parsing',
'url': 'https://errors.pydantic.dev/2.3/v/int_parsing'
}
Initial Checks
Description
When using List[Annotated[Union]] field with discriminator, its value appears in location tuple
Error i get
{
'input': '654f',
'loc': ('h', 'g', 0, 'c-discriminator', 'e', 'a'),
'msg': 'Input should be a valid integer, unable to parse string as an integer',
'type': 'int_parsing',
'url': 'https://errors.pydantic.dev/2.3/v/int_parsing'
}
Expected error
{
'input': '654f',
'loc': ('h', 'g', 0, 'e', 'a'),
'msg': 'Input should be a valid integer, unable to parse string as an integer',
'type': 'int_parsing',
'url': 'https://errors.pydantic.dev/2.3/v/int_parsing'
}
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: