feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent ae1a657554
commit ba947b616b
86 changed files with 54193 additions and 990 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ router = APIRouter()
# user 39
###########################################################
@router.get("/getuserschema/", summary="获取用户模式", description="获取指定网络的用户模式定义")
@router.get("/network-schemas/user", summary="获取用户模式", description="获取指定网络的用户模式定义")
async def fastapi_get_user_schema(network: str = Query(..., description="管网名称(或数据库名称)")) -> dict[str, dict[Any, Any]]:
"""
获取用户模式定义
@@ -17,7 +17,7 @@ async def fastapi_get_user_schema(network: str = Query(..., description="管网
"""
return get_user_schema(network)
@router.get("/getuser/", summary="获取单个用户", description="获取指定网络中的单个用户信息")
@router.get("/users/detail", summary="获取单个用户", description="获取指定网络中的单个用户信息")
async def fastapi_get_user(network: str = Query(..., description="管网名称(或数据库名称)"), user_name: str = Query(..., description="用户名")) -> dict[Any, Any]:
"""
获取用户信息
@@ -26,7 +26,7 @@ async def fastapi_get_user(network: str = Query(..., description="管网名称
"""
return get_user(network, user_name)
@router.get("/getallusers/", summary="获取所有用户", description="获取指定网络的所有用户列表")
@router.get("/users", summary="获取所有用户", description="获取指定网络的所有用户列表")
async def fastapi_get_all_users(network: str = Query(..., description="管网名称(或数据库名称)")) -> list[dict[Any, Any]]:
"""
获取所有用户列表