feat(api): standardize REST contracts and auth
This commit is contained in:
@@ -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("/meta" in r for r in routes), "缺少 Metadata 路由"
|
||||
assert any("/audit" in r for r in routes), "缺少审计日志路由 (/audit)"
|
||||
assert "/agent-auth-context" in routes, "缺少 Agent 认证上下文路由"
|
||||
assert "/projects/current/metadata" in routes, "缺少 Metadata 路由"
|
||||
assert "/audit-logs" in routes, "缺少审计日志路由"
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"路由配置检查失败: {e}")
|
||||
|
||||
Reference in New Issue
Block a user