Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Update FastAPI documentation endpoint comments

Xiaomeng Zhao90efe06a0f80
diff --git a/mineru/cli/fast_api.py b/mineru/cli/fast_api.py
index ecf88681..6d761ff4 100644
--- a/mineru/cli/fast_api.py
+++ b/mineru/cli/fast_api.py
@@ -38,8 +38,8 @@ async def limit_concurrency():
yield
def create_app():
- # By default, the OpenAPI documentation endpoints (openapi_url, docs_url, redoc_url) are disabled for security reasons.
- # To enable the FastAPI docs and schema endpoints, set the environment variable ENABLE_FASTAPI_DOCS=1.
+ # By default, the OpenAPI documentation endpoints (openapi_url, docs_url, redoc_url) are enabled.
+ # To disable the FastAPI docs and schema endpoints, set the environment variable ENABLE_FASTAPI_DOCS=0.
enable_docs = str(os.getenv("ENABLE_FASTAPI_DOCS", "1")).lower() in ("1", "true", "yes")
app = FastAPI(
openapi_url="/openapi.json" if enable_docs else None,