docs(api): 补全 OpenAPI 注释与生成文档
为接口、模型与脚本补齐 Swagger/OpenAPI 注释,生成最新文档,并增加一键生成与查看入口。
This commit is contained in:
@@ -18,6 +18,16 @@ const simulationVideoMP4Base64 = "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAA
|
||||
|
||||
var simulationVideoMP4 = mustDecodeSimulationAsset(simulationVideoMP4Base64)
|
||||
|
||||
// serveSimulationAsset godoc
|
||||
// @Summary 获取模拟资源
|
||||
// @Description 返回本地模拟模式使用的图片、视频封面或短视频资源。
|
||||
// @Tags simulation
|
||||
// @Produce image/svg+xml
|
||||
// @Produce video/mp4
|
||||
// @Param asset path string true "资源文件名,可选 image.svg、image.png、image-edit.svg、image-edit.png、video-poster.svg、video.mp4"
|
||||
// @Success 200 {file} binary
|
||||
// @Failure 404 {string} string "Not Found"
|
||||
// @Router /static/simulation/{asset} [get]
|
||||
func serveSimulationAsset(w http.ResponseWriter, r *http.Request) {
|
||||
asset := strings.ToLower(strings.TrimSpace(r.PathValue("asset")))
|
||||
switch asset {
|
||||
|
||||
Reference in New Issue
Block a user