diff --git a/examples/clients/abe/camel_case_service_name_api.go b/examples/clients/abe/camel_case_service_name_api.go index d761b19786c..cb8cb48fd99 100644 --- a/examples/clients/abe/camel_case_service_name_api.go +++ b/examples/clients/abe/camel_case_service_name_api.go @@ -37,7 +37,8 @@ func NewCamelCaseServiceNameApiWithBasePath(basePath string) *CamelCaseServiceNa } /** - * + * Create a new ABitOfEverything + * This API creates a new ABitOfEverything * * @return *interface{} */ diff --git a/examples/proto/examplepb/a_bit_of_everything.swagger.json b/examples/proto/examplepb/a_bit_of_everything.swagger.json index a83eeb952c3..edfa08730b7 100644 --- a/examples/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/proto/examplepb/a_bit_of_everything.swagger.json @@ -1589,6 +1589,8 @@ }, "/v2/example/empty": { "get": { + "summary": "Create a new ABitOfEverything", + "description": "This API creates a new ABitOfEverything", "operationId": "Empty", "responses": { "200": { diff --git a/protoc-gen-swagger/genswagger/template.go b/protoc-gen-swagger/genswagger/template.go index b802fef186d..b02ed6aa2c7 100644 --- a/protoc-gen-swagger/genswagger/template.go +++ b/protoc-gen-swagger/genswagger/template.go @@ -1366,7 +1366,7 @@ func isProtoPathMatches(paths []int32, outerPaths []int32, typeName string, type } if typeName == "Method" { - if paths[0] != serviceProtoPath || paths[1] != typeIndex || paths[2] != methodProtoPath { + if paths[0] != serviceProtoPath || paths[2] != methodProtoPath { return false } paths = paths[2:]