dev
This commit is contained in:
@@ -35,6 +35,7 @@ func (s serviceGenerator) generateInterface(f *codegen.File) {
|
||||
input := typeFromMessage(s.pkg, method.Input())
|
||||
output := typeFromMessage(s.pkg, method.Output())
|
||||
f.P(t(1), method.Name(), "(request: ", input.Reference(), "): Promise<", output.Reference(), ">;")
|
||||
|
||||
})
|
||||
f.P("}")
|
||||
f.P()
|
||||
@@ -80,6 +81,25 @@ func (s serviceGenerator) generateClient(f *codegen.File) error {
|
||||
}
|
||||
|
||||
func (s serviceGenerator) generateMethod(f *codegen.File, method protoreflect.MethodDescriptor) error {
|
||||
|
||||
loc := method.ParentFile().SourceLocations().ByDescriptor(method)
|
||||
var comments string
|
||||
if loc.TrailingComments != "" {
|
||||
comments = comments + loc.TrailingComments
|
||||
}
|
||||
if loc.LeadingComments != "" {
|
||||
comments = comments + loc.LeadingComments
|
||||
}
|
||||
|
||||
AllSrvMethods = append(AllSrvMethods, SrvMethod{
|
||||
PkgName: string(s.pkg.Name()),
|
||||
ServiceName: string(s.service.Name()),
|
||||
MethodName: string(method.Name()),
|
||||
Comment: comments,
|
||||
In: string(method.Input().Name()),
|
||||
Out: string(method.Output().Name()),
|
||||
})
|
||||
|
||||
outputType := typeFromMessage(s.pkg, method.Output())
|
||||
r, ok := httprule.Get(method)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user