Skip to content

Commit

Permalink
Merge pull request #15 from github/patrickt/fix-fqns
Browse files Browse the repository at this point in the history
Ensure API is capitalized in service FQNs.
  • Loading branch information
patrickt authored Feb 8, 2024
2 parents 1c964be + 0d0dbb5 commit 163edf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/twirp-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct ServiceGenerator;
impl prost_build::ServiceGenerator for ServiceGenerator {
fn generate(&mut self, service: prost_build::Service, buf: &mut String) {
let service_name = service.name;
let service_fqn = format!("{}.{}", service.package, service_name);
let service_fqn = format!("{}.{}", service.package, service.proto_name);
writeln!(buf).unwrap();

writeln!(buf, "pub const SERVICE_FQN: &str = \"/{service_fqn}\";").unwrap();
Expand Down

0 comments on commit 163edf9

Please sign in to comment.