Swagger.v1.json template (#3572)

* Turn swagger.v1.json into template

* Rename ENABLE_SWAGGER_ENDPOINT option to ENABLE_SWAGGER
This commit is contained in:
Piotr Orzechowski
2018-07-28 02:19:01 +02:00
committed by Lauris BH
parent 412583a3f2
commit a74426d631
14 changed files with 74 additions and 21 deletions

14
routers/swagger_json.go Normal file
View File

@ -0,0 +1,14 @@
package routers
import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
)
// tplSwaggerV1Json swagger v1 json template
const tplSwaggerV1Json base.TplName = "swagger/v1_json"
// SwaggerV1Json render swagger v1 json
func SwaggerV1Json(ctx *context.Context) {
ctx.HTML(200, tplSwaggerV1Json)
}