-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce optional serde support for model code generation
This introduces several things to optionally support automatic derive attributes for `serde::{Deserialize, Serialize}` for the generated models: - introduces a feature flag for `sea-orm-codegen` which optionally includes the serde dependency (can be activated via `cargo build / install --features with-serde`), - introduces a `WithSerde` enum to indicate if Serialize, Deserialize, or even both should be derived from, - introduces a feature flag for `sea-orm-cli` which optionally activates the `sea-orm-codegen` feature flag `with-serde` (can also be activated via `cargo build / install --features with-serde`), - adds an optional cli argument `--with-serde [none: default, serialize, deserialize, both]` - adds test harness for both compact and expanded generation Potential TODOs: - Add conditional compilation for the cli argument `--with-serde`
- Loading branch information
Showing
21 changed files
with
984 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.