diff options
author | Piotr Orzechowski <piotr@orzechowski.tech> | 2018-07-28 02:19:01 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-07-28 03:19:01 +0300 |
commit | a74426d631e3311cc3c460ae9917f76f0221f4de (patch) | |
tree | 1343766d999308825f42bc0b67c1845a5e9e9546 /routers/api/v1/api.go | |
parent | 412583a3f28162c89e827fbb586319ac8eea9825 (diff) | |
download | gitea-a74426d631e3311cc3c460ae9917f76f0221f4de.tar.gz gitea-a74426d631e3311cc3c460ae9917f76f0221f4de.zip |
Swagger.v1.json template (#3572)
* Turn swagger.v1.json into template
* Rename ENABLE_SWAGGER_ENDPOINT option to ENABLE_SWAGGER
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 3174e56374..5d47570c5f 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -278,13 +278,13 @@ func mustAllowPulls(ctx *context.Context) { func RegisterRoutes(m *macaron.Macaron) { bind := binding.Bind - if setting.API.EnableSwaggerEndpoint { + if setting.API.EnableSwagger { m.Get("/swagger", misc.Swagger) //Render V1 by default } m.Group("/v1", func() { // Miscellaneous - if setting.API.EnableSwaggerEndpoint { + if setting.API.EnableSwagger { m.Get("/swagger", misc.Swagger) } m.Get("/version", misc.Version) |