This commit is contained in:
2026-10-01 23:47:20 +03:00
parent e47a45dc93
commit 86222f5f93
6 changed files with 49 additions and 11 deletions
+10 -1
View File
@@ -48,7 +48,16 @@ def create_app(config: Config | None = None) -> FastAPI:
log_event(logger, logging.ERROR, "CV core not ready", reasons=app.state.cv.ready_reasons)
yield
app = FastAPI(title="open_cv", version="1.0.0", lifespan=lifespan)
# Документация под префиксом /api: при проксировании наружу только /api/*
# Swagger, ReDoc и спека остаются достижимы (эндпоинты API — /api/v1/*).
app = FastAPI(
title="open_cv",
version="1.0.0",
lifespan=lifespan,
docs_url="/api/docs",
redoc_url="/api/redoc",
openapi_url="/api/openapi.json",
)
app.state.config = config
app.state.cv = CvService(config)
app.state.ready = False