mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
Merge pull request #192 from dangerous1990/master
fix: proto2swagger support same path different method (close #191)
This commit is contained in:
commit
4a22482922
@ -74,7 +74,9 @@ func (t *swaggerGen) generateSwagger(file *descriptor.FileDescriptorProto) *plug
|
||||
}
|
||||
apiInfo := t.GetHttpInfoCached(file, svc, meth)
|
||||
pathItem := swaggerPathItemObject{}
|
||||
|
||||
if originPathItem, ok := swaggerObj.Paths[apiInfo.Path]; ok {
|
||||
pathItem = originPathItem
|
||||
}
|
||||
op := t.getOperationByHTTPMethod(apiInfo.HttpMethod, &pathItem)
|
||||
op.Summary = apiInfo.Title
|
||||
op.Description = apiInfo.Description
|
||||
|
Loading…
x
Reference in New Issue
Block a user