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
Originally posted by birdca September 8, 2023
I was trying to use SkipValidation like this:
class ModelA(BaseModel):
pass
class ModelB(BaseModel):
a: ModelA
pass
class ModelC(BaseModel):
b: list[SkipValidation[ModelB]]
pass
but i get
pydantic_core._pydantic_core.SchemaError: Invalid Schema:
function-after.schema.model.schema.model-fields.fields.b.schema.list.items_schema.any.serialization
Input tag 'definition-ref' found using 'type' does not match any of the expected tags: 'none', 'int', 'bool', 'float', 'str', 'bytes', 'bytearray', 'list', 'tuple', 'set', 'frozenset', 'generator', 'dict', 'datetime', 'date', 'time', 'timedelta', 'url', 'multi-host-url', 'json', 'uuid', 'function-plain', 'function-wrap', 'format', 'to-string', 'model' [type=union_tag_invalid, input_value={'type': 'definition-ref'...ModelB:140286906022960'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.3/v/union_tag_invalid
Wondering how to skip validation for b field?
The text was updated successfully, but these errors were encountered:
Discussed in #7373
Originally posted by birdca September 8, 2023
I was trying to use SkipValidation like this:
but i get
Wondering how to skip validation for b field?
The text was updated successfully, but these errors were encountered: