|
|
|
@ -83,7 +83,7 @@ void PrintService(const ServiceDescriptor* service, const string& package, |
|
|
|
|
|
|
|
|
|
// Begin the service module
|
|
|
|
|
map<string, string> module_vars = ListToDict({ |
|
|
|
|
"module.name", CapitalizeString(service->name()), |
|
|
|
|
"module.name", CapitalizeFirst(service->name()), |
|
|
|
|
}); |
|
|
|
|
out->Print(module_vars, "module $module.name$\n"); |
|
|
|
|
out->Indent(); |
|
|
|
@ -131,8 +131,9 @@ string GetServices(const FileDescriptor* file) { |
|
|
|
|
"file.name", file->name(), |
|
|
|
|
"file.package", file->package(), |
|
|
|
|
}); |
|
|
|
|
out.Print("# Generated by the protocol buffer compiler. DO NOT EDIT!\n"); |
|
|
|
|
out.Print(header_comment_vars, |
|
|
|
|
"### Generated from $file.name$ for $file.package$\n"); |
|
|
|
|
"# Source: $file.name$ for package '$file.package$'\n"); |
|
|
|
|
if (file->service_count() == 0) { |
|
|
|
|
return output; |
|
|
|
|
} |
|
|
|
@ -152,7 +153,7 @@ string GetServices(const FileDescriptor* file) { |
|
|
|
|
vector<string> modules = Split(file->package(), '.'); |
|
|
|
|
for (size_t i = 0; i < modules.size(); ++i) { |
|
|
|
|
map<string, string> module_vars = ListToDict({ |
|
|
|
|
"module.name", CapitalizeString(modules[i]), |
|
|
|
|
"module.name", CapitalizeFirst(modules[i]), |
|
|
|
|
}); |
|
|
|
|
out.Print(module_vars, "module $module.name$\n"); |
|
|
|
|
out.Indent(); |
|
|
|
|