docs(api): 补全 OpenAPI 注释与生成文档
为接口、模型与脚本补齐 Swagger/OpenAPI 注释,生成最新文档,并增加一键生成与查看入口。
This commit is contained in:
@@ -123,6 +123,16 @@ type catalogGroup struct {
|
||||
enabled bool
|
||||
}
|
||||
|
||||
// listModelCatalog godoc
|
||||
// @Summary 列出模型目录
|
||||
// @Description 聚合平台模型、基础模型、供应商、运行策略和访问规则,返回前端模型目录所需的过滤器、摘要和展示字段。
|
||||
// @Tags model-catalog
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Success 200 {object} ModelCatalogResponse
|
||||
// @Failure 401 {object} ErrorEnvelope
|
||||
// @Failure 500 {object} ErrorEnvelope
|
||||
// @Router /api/v1/model-catalog [get]
|
||||
func (s *Server) listModelCatalog(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
models, err := s.store.ListModels(ctx)
|
||||
|
||||
Reference in New Issue
Block a user