Merge branch 'refactor/backend-architecture' into development

This commit is contained in:
yangshilin
2026-03-18 17:18:23 +08:00
parent 2070a03d35
commit 48b70e1350
266 changed files with 12386 additions and 9690 deletions

25
api/app/core/openapi.py Normal file
View File

@@ -0,0 +1,25 @@
"""
OpenAPI 全局增强:只做 title/version/description 等元数据,不替代 router 上的正常声明。
"""
from fastapi import FastAPI
from fastapi.openapi.utils import get_openapi
def custom_openapi(app: FastAPI) -> dict:
if app.openapi_schema:
return app.openapi_schema
openapi_schema = get_openapi(
title="Life Echo API",
version="1.0.0",
summary="岁月时书 — 口述回忆录生产平台",
description=(
"为老年用户提供 AI 驱动的回忆录创作服务:\n"
"语音对话采集 → 素材沉淀 → 章节生成 → PDF 导出。"
),
routes=app.routes,
)
app.openapi_schema = openapi_schema
return app.openapi_schema