Skip to content

Commit

Permalink
fix prefix not start with /
Browse files Browse the repository at this point in the history
  • Loading branch information
bensonfx committed Sep 25, 2022
1 parent 7df4fb1 commit 489a446
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generate/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ func applyGenerate(p *plugin.Plugin, host string, basePath string) (*swaggerObje
func renderServiceRoutes(service spec.Service, groups []spec.Group, paths swaggerPathsObject, requestResponseRefs refMap) {
for _, group := range groups {
for _, route := range group.Routes {

path := group.GetAnnotation("prefix") + route.Path
if path[0] != '/' {
path = "/" + path
}
parameters := swaggerParametersObject{}

if countParams(path) > 0 {
Expand Down

0 comments on commit 489a446

Please sign in to comment.