mirror of
https://github.com/beego/bee.git
synced 2024-12-23 01:30:50 +00:00
urlReplace all the paths
This commit is contained in:
parent
20da95be6e
commit
fd7742863d
@ -219,6 +219,7 @@ func analisysNSInclude(baseurl string, ce *ast.CallExpr) string {
|
||||
if len(rootapi.Paths) == 0 {
|
||||
rootapi.Paths = make(map[string]*swagger.Item)
|
||||
}
|
||||
rt = urlReplace(rt)
|
||||
rootapi.Paths[rt] = item
|
||||
}
|
||||
}
|
||||
@ -338,7 +339,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
|
||||
if len(e1) < 1 {
|
||||
return errors.New("you should has router infomation")
|
||||
}
|
||||
routerPath = urlReplace(e1[0])
|
||||
routerPath = e1[0]
|
||||
if len(e1) == 2 && e1[1] != "" {
|
||||
e1 = strings.SplitN(e1[1], " ", 2)
|
||||
HTTPMethod = strings.ToUpper(strings.Trim(e1[0], "[]"))
|
||||
|
Loading…
Reference in New Issue
Block a user