feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent 9bff6a556a
commit 91f25c8747
77 changed files with 54018 additions and 658 deletions
+3 -3
View File
@@ -48,9 +48,9 @@ def test_router_configuration():
routes = [r.path for r in api_router.routes if hasattr(r, "path")]
# 验证基础路径是否存在
assert any("/agent/auth/context" in r for r in routes), "缺少 Agent 认证上下文路由"
assert any("/admin/me" in r for r in routes), "缺少元数据管理认证路由"
assert any("/audit" in r for r in routes), "缺少审计日志路由 (/audit)"
assert "/agent-auth-context" in routes, "缺少 Agent 认证上下文路由"
assert "/admin/users/me" in routes, "缺少元数据管理认证路由"
assert "/audit-logs" in routes, "缺少审计日志路由"
except Exception as e:
pytest.fail(f"路由配置检查失败: {e}")