mirror of
https://github.com/beego/bee.git
synced 2024-12-23 01:30:50 +00:00
fix the rename in beego
This commit is contained in:
parent
eb99d12c83
commit
0acdf2e816
3
fix.go
3
fix.go
@ -82,7 +82,7 @@ var rules = []string{
|
||||
"beego.FlashName", "beego.BConfig.WebConfig.FlashName",
|
||||
"beego.FlashSeperator", "beego.BConfig.WebConfig.FlashSeparator",
|
||||
"beego.EnableDocs", "beego.BConfig.WebConfig.EnableDocs",
|
||||
"beego.XSRFKEY", "beego.BConfig.WebConfig.XSRFKEY",
|
||||
"beego.XSRFKEY", "beego.BConfig.WebConfig.XSRFKey",
|
||||
"beego.EnableXSRF", "beego.BConfig.WebConfig.EnableXSRF",
|
||||
"beego.XSRFExpire", "beego.BConfig.WebConfig.XSRFExpire",
|
||||
"beego.TemplateLeft", "beego.BConfig.WebConfig.TemplateLeft",
|
||||
@ -121,6 +121,7 @@ var rules = []string{
|
||||
"swagger.ApiDeclaration", "swagger.APIDeclaration",
|
||||
"swagger.Api", "swagger.API",
|
||||
"swagger.ApiRef", "swagger.APIRef",
|
||||
"swagger.Infomation", "swagger.Information",
|
||||
"toolbox.UrlMap", "toolbox.URLMap",
|
||||
"logs.LoggerInterface", "logs.Logger",
|
||||
"Input.Request", "Input.Context.Request",
|
||||
|
14
g_docs.go
14
g_docs.go
@ -126,7 +126,7 @@ func generateDocs(curpath string) {
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
rootapi.Infos = swagger.Infomation{}
|
||||
rootapi.Info = swagger.Information{}
|
||||
rootapi.SwaggerVersion = swagger.SwaggerVersion
|
||||
//analysis API comments
|
||||
if f.Comments != nil {
|
||||
@ -135,17 +135,17 @@ func generateDocs(curpath string) {
|
||||
if strings.HasPrefix(s, "@APIVersion") {
|
||||
rootapi.APIVersion = strings.TrimSpace(s[len("@APIVersion"):])
|
||||
} else if strings.HasPrefix(s, "@Title") {
|
||||
rootapi.Infos.Title = strings.TrimSpace(s[len("@Title"):])
|
||||
rootapi.Info.Title = strings.TrimSpace(s[len("@Title"):])
|
||||
} else if strings.HasPrefix(s, "@Description") {
|
||||
rootapi.Infos.Description = strings.TrimSpace(s[len("@Description"):])
|
||||
rootapi.Info.Description = strings.TrimSpace(s[len("@Description"):])
|
||||
} else if strings.HasPrefix(s, "@TermsOfServiceUrl") {
|
||||
rootapi.Infos.TermsOfServiceURL = strings.TrimSpace(s[len("@TermsOfServiceUrl"):])
|
||||
rootapi.Info.TermsOfServiceURL = strings.TrimSpace(s[len("@TermsOfServiceUrl"):])
|
||||
} else if strings.HasPrefix(s, "@Contact") {
|
||||
rootapi.Infos.Contact = strings.TrimSpace(s[len("@Contact"):])
|
||||
rootapi.Info.Contact = strings.TrimSpace(s[len("@Contact"):])
|
||||
} else if strings.HasPrefix(s, "@License") {
|
||||
rootapi.Infos.License = strings.TrimSpace(s[len("@License"):])
|
||||
rootapi.Info.License = strings.TrimSpace(s[len("@License"):])
|
||||
} else if strings.HasPrefix(s, "@LicenseUrl") {
|
||||
rootapi.Infos.LicenseURL = strings.TrimSpace(s[len("@LicenseUrl"):])
|
||||
rootapi.Info.LicenseURL = strings.TrimSpace(s[len("@LicenseUrl"):])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user