Skip to content

Commit

Permalink
Fix incorrect routes in generated client when service is not in a pac…
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n authored and w4rum committed Dec 1, 2020
1 parent 30ef485 commit 26342d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/betterproto/plugin/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,10 @@ def proto_name(self) -> str:

@property
def route(self) -> str:
return f"/{self.output_file.package}.{self.parent.proto_name}/{self.proto_name}"
package_part = (
f"{self.output_file.package}." if self.output_file.package else ""
)
return f"/{package_part}{self.parent.proto_name}/{self.proto_name}"

@property
def py_input_message(self) -> Optional[MessageCompiler]:
Expand Down

0 comments on commit 26342d9

Please sign in to comment.