Files

19 lines
486 B
Go
Raw Permalink Normal View History

2020-04-05 01:20:50 -05:00
// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
2020-04-05 01:20:50 -05:00
2021-06-09 07:33:54 +08:00
package web
2018-07-28 02:19:01 +02:00
import (
"html/template"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/services/context"
2018-07-28 02:19:01 +02:00
)
// SwaggerV1Json render swagger v1 json
func SwaggerV1Json(ctx *context.Context) {
ctx.Data["SwaggerAppVer"] = template.HTML(template.JSEscapeString(setting.AppVer))
ctx.Data["SwaggerAppSubUrl"] = setting.AppSubURL // it is JS-safe
2024-02-18 17:52:02 +08:00
ctx.JSONTemplate("swagger/v1_json")
2018-07-28 02:19:01 +02:00
}