sqlmodel
sqlmodel copied to clipboard
Expose pydantic's Field(validation_alias=,serialization_alias=...) parameter
This expands upon and closes PR #774 by adding serialization_alias and missing Field override parameters.
Allows for serializing json using serialization_alias when by_alias is true
object.model_dump_json(by_alias=True)
Dear all, it would be totally awesome to release this. The issue exists several months and several versions already https://github.com/tiangolo/sqlmodel/discussions/725. Please, let's get some traction here :)
second the push to get this merged as soon as possible please 🙏
I have to map thousands (yes thousands) of field names from a third-party API onto a local DB with different column names, and having to write schema_extra={"validation_alias": "some_thirdparty_name"}) hundreds of times is a chore.