From 4568865792f21a1af231c94782f044894a567225 Mon Sep 17 00:00:00 2001 From: "Kent.N" Date: Sun, 7 Jun 2020 18:07:15 +0900 Subject: [PATCH] fix rpc comment generation against allow_merge --- protoc-gen-swagger/genswagger/generator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protoc-gen-swagger/genswagger/generator.go b/protoc-gen-swagger/genswagger/generator.go index ecf1135fde7..30fb7a7e4e8 100644 --- a/protoc-gen-swagger/genswagger/generator.go +++ b/protoc-gen-swagger/genswagger/generator.go @@ -168,7 +168,7 @@ func (g *generator) Generate(targets []*descriptor.File) ([]*plugin.CodeGenerato for _, f := range targets { if mergedTarget == nil { mergedTarget = f - } else { + } else if mergedTarget != f { mergedTarget.Enums = append(mergedTarget.Enums, f.Enums...) mergedTarget.Messages = append(mergedTarget.Messages, f.Messages...) mergedTarget.Services = append(mergedTarget.Services, f.Services...)