Skip to content

Commit

Permalink
Merge pull request #99 from suyuan32/dev
Browse files Browse the repository at this point in the history
fix: wrong group in swagger when use multiple folder
  • Loading branch information
suyuan32 authored May 21, 2024
2 parents 8618c99 + 3aaa050 commit d962622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/gogen/genhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func genHandler(dir, rootPkg string, cfg *config.Config, group spec.Group, route
swaggerPath = path.Join("/", prefix, swaggerPath)

handlerDoc.WriteString(fmt.Sprintf("// swagger:route %s %s %s %s \n", route.Method, swaggerPath,
group.GetAnnotation("group"), strings.TrimSuffix(handler, "Handler")))
strings.ReplaceAll(group.GetAnnotation("group"), "/", "-"), strings.TrimSuffix(handler, "Handler")))
handlerDoc.WriteString("//\n")
handlerDoc.WriteString(fmt.Sprintf("%s\n", strings.Join(route.HandlerDoc, " ")))
handlerDoc.WriteString("//\n")
Expand Down

0 comments on commit d962622

Please sign in to comment.