Merge pull request #4 from wanrui/main

fix: change var from Annotation to AtDoc
This commit is contained in:
MaxToby 2021-03-30 20:21:35 +08:00 committed by GitHub
commit de003dbcfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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) {