MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / M

Class M

tests/test_aliases.py:125–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124def test_schema_extra_validation_alias_sqlmodel_v2():
125 class M(SQLModel):
126 f: str = Field(schema_extra={"validation_alias": "f_alias"})
127
128 m = M.model_validate({"f_alias": "asd"})
129 assert m.f == "asd"

Calls 1

FieldFunction · 0.90