refactor(api): quarantine legacy container routes
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user