Fix incorrect routes in generated client when service is not in a package (#177)

This commit is contained in:
nat
2020-11-28 17:50:25 +01:00
committed by GitHub
parent a157f05480
commit 73cea12e1f

View File

@@ -638,7 +638,10 @@ class ServiceMethodCompiler(ProtoContentBase):
@property @property
def route(self) -> str: 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 @property
def py_input_message(self) -> Optional[MessageCompiler]: def py_input_message(self) -> Optional[MessageCompiler]: