WeKnora/internal/handler
nullkey c753c67608 docs(api): add and fix swag annotations on handlers
将 swag 注解覆盖率从 ~88% 提升到 100%,并修复审计中发现的若干既有
注解 bug。

新增注解(24 个):
- im.go: 4 (UpdateIMChannel/DeleteIMChannel/ToggleIMChannel/IMCallback)
  其中 IMCallback 同时注册 GET 和 POST,两个方法都加了 @Router 声明。
- web_search.go: 1 (GetProviders)
- web_search_provider.go: 6
- wechat_qrcode.go: 2
- weknoracloud.go: 2
- knowledge.go: 2 (MoveKnowledge/GetKnowledgeMoveProgress)
- knowledgebase.go: 1 (ListMoveTargets)
- organization.go: 3 (ListSharedAgents/ListOrgAgentShares/RemoveAgentShare)
- mcp_service.go: 2 (SetMCPToolApproval/ResolveToolApproval)
- chunker_debug.go: 1 (PreviewChunking)

修复既有注解 bug(12 处):
- initialization.go: 10 个 @Router 路径与真实路由不符
  (e.g. /initialization/kb/{kbId}/config → /initialization/config/{kbId}
   /initialization/fabri/tag GET → /initialization/extract/fabri-tag POST)
- session/stream.go: ContinueStream 路径
  /sessions/{session_id}/continue → /sessions/continue-stream/{session_id}
- mcp_service.go: ResolveToolApproval 请求体 {approve: bool}
  → {decision: "approve"|"reject", reason?, modified_args?}

收敛响应 schema 到已有命名 struct(之前用 map[string]interface{}):
- knowledge.go MoveKnowledge → handler.MoveKnowledgeResponse
- knowledge.go GetKnowledgeMoveProgress → types.KnowledgeMoveProgress
- web_search_provider.go GetProvider/UpdateProvider → types.WebSearchProviderEntity
- initialization.go InitializeByKB → handler.InitializationRequest
- initialization.go 三个 model-test endpoint → handler.ModelTestRequest

修正 organization.go 中 errors.AppError 应使用 apperrors 别名(该文件
stdlib errors 未别名化)。

不补 /files 和 /api/v1/files/presigned 内联闭包路由(文件服务,非业务 REST)。

Refs #890 #1049 #1168
2026-05-12 13:16:58 +08:00
..
session docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
auth.go feat: implement auto-setup for Lite edition, enhancing user experience by automating user and tenant creation on first launch 2026-04-11 18:51:16 +08:00
chunk.go feat(api): enhance organization shared knowledge base and agent functionalities 2026-02-09 11:40:25 +08:00
chunker_debug.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
chunker_debug_test.go fix(chunker): post-review fixes for preview endpoint robustness 2026-05-06 17:17:07 +08:00
custom_agent.go fix(agent): improve tenant context handling and error reporting 2026-04-24 22:40:57 +08:00
datasource.go feat(datasource): enforce tenant isolation and knowledge base ownership 2026-03-30 20:46:07 +08:00
evaluation.go feat: 新增API Key认证支持,优化Swagger文档安全配置 2025-12-22 15:01:09 +08:00
faq.go feat(api): enhance organization shared knowledge base and agent functionalities 2026-02-09 11:40:25 +08:00
im.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
initialization.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
knowledge.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
knowledgebase.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
mcp_service.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
message.go feat: implement chat history and retrieval settings 2026-03-09 11:46:56 +08:00
model.go feat(asr): add ASR model connection check and update related components 2026-04-02 21:27:27 +08:00
organization.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
skill_handler.go feat: update sandbox service configuration in Docker Compose files 2026-02-04 21:34:07 +08:00
storage_allowlist.go feat(ks3): add KS3 object storage support 2026-05-05 00:22:27 +08:00
system.go fix(storage): merge tos/s3/oss/ks3 tenant configs in buildStorageConfig (#1117) 2026-05-06 17:09:42 +08:00
tag.go feat: enhance document loading and state management in doc-content component 2026-03-02 21:21:49 +08:00
tenant.go fix(web-search): normalize default tenant web search config at runtime 2026-04-30 15:28:35 +08:00
vectorstore.go feat: add VectorStore CRUD API endpoints and documentation 2026-04-14 17:34:57 +08:00
web_search.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
web_search_provider.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
wechat_qrcode.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
weknoracloud.go docs(api): add and fix swag annotations on handlers 2026-05-12 13:16:58 +08:00
wiki_page.go perf(wiki): move ingest log to event table and index to on-demand API 2026-05-08 21:48:52 +08:00