summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/context/context.go1
-rw-r--r--modules/setting/setting.go6
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index 311186e644..ea26184397 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -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)
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 338637836d..936dac85c4 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -515,9 +515,11 @@ var (
// API settings
API = struct {
- MaxResponseItems int
+ EnableSwaggerEndpoint bool
+ MaxResponseItems int
}{
- MaxResponseItems: 50,
+ EnableSwaggerEndpoint: true,
+ MaxResponseItems: 50,
}
// I18n settings