fix: change var from Annotation to AtDoc

This commit is contained in:
万锐 2021-03-25 21:52:31 +08:00
parent 84b1c872c6
commit cd67d081c9

View File

@ -179,9 +179,9 @@ func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swagge
}
}
if len(route.Annotation.Properties) > 0 {
operationObject.Summary, _ = strconv.Unquote(route.GetAnnotation("summary"))
operationObject.Description, _ = strconv.Unquote(route.GetAnnotation("description"))
if len(route.AtDoc.Properties) > 0 {
operationObject.Summary, _ = strconv.Unquote(route.AtDoc.Properties["summary"])
operationObject.Description, _ = strconv.Unquote(route.AtDoc.Properties["description"])
}
switch strings.ToUpper(route.Method) {