From cd67d081c9f4f2567dc2f07695f6cdd960759484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E9=94=90?= Date: Thu, 25 Mar 2021 21:52:31 +0800 Subject: [PATCH] fix: change var from Annotation to AtDoc --- generate/parser.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generate/parser.go b/generate/parser.go index 7a883c8..f67841e 100644 --- a/generate/parser.go +++ b/generate/parser.go @@ -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) {