Update parser.go

Support for defining swagger tags
This commit is contained in:
MaxToby 2021-09-10 15:44:38 +08:00 committed by GitHub
parent 5c5157d75d
commit cb37f89d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,6 +163,9 @@ func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swagge
if value := group.GetAnnotation("group"); len(value) > 0 {
tags = value
}
if value := group.GetAnnotation("swtags"); len(value) > 0 {
tags = value
}
operationObject := &swaggerOperationObject{
Tags: []string{tags},
Parameters: parameters,