mirror of https://github.com/go-gitea/gitea.git
Swagger.v1.json template (#3572)
* Turn swagger.v1.json into template * Rename ENABLE_SWAGGER_ENDPOINT option to ENABLE_SWAGGERpull/4531/head
parent
412583a3f2
commit
a74426d631
@ -1,2 +1,3 @@
|
||||
public/
|
||||
templates/swagger/v1_json.tmpl
|
||||
themes/
|
||||
|
@ -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)
|
||||
}
|
Loading…
Reference in New Issue