sea-orm
sea-orm copied to clipboard
Add sea-orm-cli flag to skip deserialization of primary keys for entities
Motivation
Expecting a JSON value with a web framework usually makes it return the correct status codes etc. if an entity cannot be deserialized from the request, but currently this is hard to do as the entities by default required the primary key to be present in the JSON, which is not what a POST
request tends to accept.
Proposed Solutions
Add a flag to sea-orm-cli
that enables #[serde(skip_deserializing)]
for primary keys of entities.
I'd love to work on this, but I'm not sure when that will be. If someone else wants to implement this, feel free to do so.
Since I'm a first time contributor to sea-orm I'd love some hints where this would roughly be implemented and what to look out for, if anything.