Skip to content

Commit

Permalink
fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDewes committed Oct 30, 2024
1 parent f024d64 commit f6e7039
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
39 changes: 24 additions & 15 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions schema-engine/json-rpc-api-build/src/rust_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ pub(crate) fn generate_rust_crate(out_dir: &Path, api: &Api) -> CrateResult {
writeln!(
librs,
"//! ➡️ [{request_name}](./types/struct.{request_name}.html)\n//!",
request_name = method.request_shape.to_camel_case()
request_name = method.request_shape.to_upper_camel_case()
)?;
writeln!(
librs,
"//! ↩️ [{response_name}](./types/struct.{response_name}.html)\n//!",
response_name = method.response_shape.to_camel_case()
response_name = method.response_shape.to_upper_camel_case()
)?;

if let Some(description) = &method.description {
Expand Down Expand Up @@ -129,7 +129,7 @@ fn generate_types_rs(mut file: impl std::io::Write, api: &Api) -> CrateResult {
}
}

let cc_variant_name = variant_name.to_camel_case();
let cc_variant_name = variant_name.to_upper_camel_case();

if cc_variant_name.as_str() != variant_name {
writeln!(file, "///\n/// JSON name: {variant_name}")?;
Expand Down Expand Up @@ -158,6 +158,6 @@ fn rustify_type_name(name: &str) -> Cow<'static, str> {
"isize" => Cow::Borrowed("isize"),
"string" => Cow::Borrowed("String"),
"serde_json::Value" => Cow::Borrowed("serde_json::Value"),
other => other.to_camel_case().into(),
other => other.to_upper_camel_case().into(),
}
}

0 comments on commit f6e7039

Please sign in to comment.