feat(qaops): 接入独立只读问答查询与治理覆盖复检

This commit is contained in:
姚章浩
2026-10-17 09:04:19 +08:00
parent c1d49adb62
commit fd04bf7886
42 changed files with 4479 additions and 5 deletions
+54 -1
View File
@@ -3,7 +3,7 @@
"info": {
"title": "Knowledge Governance API",
"version": "v1",
"description": "独立知识治理控制平面API。所有响应使用安全投影;不返回来源凭据、签名下载地址、原始内容、内部目标连接或生产密钥。"
"description": "独立知识治理控制平面API。响应不返回来源凭据、内部目标连接或生产密钥。问答运营仅向已登录且获授权的管理员返回业务问答正文,禁止共享缓存。"
},
"servers": [
{
@@ -44,6 +44,59 @@
}
],
"paths": {
"/api/v1/qa-ops/status": {
"get": {
"tags": ["QA operations"],
"operationId": "getQAOperationsStatus",
"summary": "读取独立问答只读数据源状态与安全告警,不返回连接信息;需要管理员会话",
"responses": {
"200": {"$ref": "#/components/responses/Envelope"},
"400": {"$ref": "#/components/responses/BadRequest"},
"401": {"description": "需要登录"},
"403": {"description": "未获员工问答查看授权"},
"500": {"$ref": "#/components/responses/InternalError"}
}
}
},
"/api/v1/qa-ops/records": {
"get": {
"tags": ["QA operations"],
"operationId": "listQAOperationsRecords",
"summary": "按半开提问时间范围、原问题关键词、稳定游标列出钉钉问答;租户由后端固定;答案包含暂无已发布则治理侧未覆盖",
"parameters": [
{"name": "start", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}},
{"name": "end", "in": "query", "required": true, "schema": {"type": "string", "format": "date-time"}},
{"name": "keyword", "in": "query", "schema": {"type": "string", "maxLength": 200}},
{"name": "cursor", "in": "query", "schema": {"type": "string", "maxLength": 2048}},
{"name": "limit", "in": "query", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 20}}
],
"responses": {
"200": {"$ref": "#/components/responses/Envelope"},
"400": {"$ref": "#/components/responses/BadRequest"},
"401": {"description": "需要登录"},
"403": {"description": "未获员工问答查看授权"},
"503": {"description": "源库未接入、不可用或权限护栏阻断,不返回空列表伪装成功"},
"500": {"$ref": "#/components/responses/InternalError"}
}
}
},
"/api/v1/qa-ops/records/{id}": {
"get": {
"tags": ["QA operations"],
"operationId": "getQAOperationsRecord",
"summary": "读取授权租户内的完整问答与源端覆盖对照;治理覆盖规则独立,不写回源库",
"parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string", "maxLength": 256}}],
"responses": {
"200": {"$ref": "#/components/responses/Envelope"},
"400": {"$ref": "#/components/responses/BadRequest"},
"401": {"description": "需要登录"},
"403": {"description": "未获员工问答查看授权"},
"404": {"description": "当前授权范围内不存在此问答"},
"503": {"description": "独立只读源不可用或权限校验阻断"},
"500": {"$ref": "#/components/responses/InternalError"}
}
}
},
"/api/v1/build-info": {
"get": {
"tags": [