Skip to content

Commit

Permalink
Add rename_all serde attribute to protos for converting from camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrit committed Aug 28, 2024
1 parent b0decf4 commit c4273e9
Show file tree
Hide file tree
Showing 3 changed files with 1,269 additions and 460 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ fn generate_rust_protos() {
let mut config = prost_build::Config::default();
config.out_dir(tmp_dir);
config.type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]");
config.type_attribute(".", "#[serde(rename_all = \"camelCase\")]");
config.compile_protos(&protos, &steward_proto_dir).unwrap();

// Compile all proto client for GRPC services
Expand Down
Loading

0 comments on commit c4273e9

Please sign in to comment.