refactor(api): quarantine legacy container routes
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 56s
Deploy / Deploy Production (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled

This commit is contained in:
Xiaoxia AI
2026-06-21 00:37:42 +08:00
parent f474b97a57
commit b965d8d766
5 changed files with 59 additions and 5 deletions
+14 -2
View File
@@ -1,5 +1,17 @@
"""Compatibility exports for the canonical API router module."""
"""API route package.
The canonical aggregated router lives in `app.api.router`. This package must not
import route modules at package-import time, otherwise importing any sub-route can
trigger circular imports and optional infrastructure dependencies.
"""
def __getattr__(name: str):
if name in {"api_router", "health_router"}:
from app.api.router import api_router, health_router
return {"api_router": api_router, "health_router": health_router}[name]
raise AttributeError(name)
from app.api.router import api_router, health_router
__all__ = ["api_router", "health_router"]
+9 -1
View File
@@ -1,6 +1,14 @@
"""
认证 API 路由
Legacy full-auth API route skeleton.
This module is intentionally disabled until the DI container/auth ports are rebuilt.
Do not mount it directly; use `auth_simple.py` only as the current compatibility route.
"""
raise RuntimeError(
"apps.api.app.api.routes.auth is disabled: rebuild DI container before mounting full auth routes"
)
from fastapi import APIRouter, HTTPException, status, Depends, Request
from pydantic import BaseModel, EmailStr
+9 -1
View File
@@ -1,6 +1,14 @@
"""
Workspace API 路由(完整实现)
Legacy workspace API route skeleton.
This module depends on the removed DI container and is intentionally disabled until
workspace use cases are wired through the canonical API composition root.
"""
raise RuntimeError(
"apps.api.app.api.routes.workspaces is disabled: rebuild DI container before mounting workspace routes"
)
from fastapi import APIRouter, HTTPException, status, Depends
from pydantic import BaseModel, EmailStr
from typing import List