Add option to enable or disable swagger endpoints (#3502)
This commit is contained in:
parent
4c9d9c221a
commit
b104ab3ca1
5 changed files with 15 additions and 5 deletions
|
@ -243,6 +243,7 @@ func Contexter() macaron.Handler {
|
|||
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
|
||||
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding
|
||||
ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion
|
||||
ctx.Data["EnableSwaggerEndpoint"] = setting.API.EnableSwaggerEndpoint
|
||||
ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
|
||||
|
||||
c.Map(ctx)
|
||||
|
|
|
@ -515,9 +515,11 @@ var (
|
|||
|
||||
// API settings
|
||||
API = struct {
|
||||
MaxResponseItems int
|
||||
EnableSwaggerEndpoint bool
|
||||
MaxResponseItems int
|
||||
}{
|
||||
MaxResponseItems: 50,
|
||||
EnableSwaggerEndpoint: true,
|
||||
MaxResponseItems: 50,
|
||||
}
|
||||
|
||||
// I18n settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue