Skip to content

Commit

Permalink
Merge pull request #54 from bensonfx/fix_prefix_not_start_with_slash
Browse files Browse the repository at this point in the history
fix prefix not start with /
  • Loading branch information
MaxToby authored Sep 27, 2022
2 parents a18b949 + 546f2f1 commit 3ff75d2
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 3ff75d2

Please sign in to comment.