Skip to content

Commit 99dcba3

Browse files
committed
feat: Add Api Docs
1 parent 37bf819 commit 99dcba3

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

backend/apps/datasource/api/datasource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def insert_pg(df, tableName, engine):
372372
f_c_col = "字段备注"
373373

374374

375-
@router.get("/exportDsSchema/{id}")
375+
@router.get("/exportDsSchema/{id}", response_model=None, summary=f"{PLACEHOLDER_PREFIX}ds_export_ds_schema")
376376
async def export_ds_schema(session: SessionDep, id: int = Path(..., description=f"{PLACEHOLDER_PREFIX}ds_id")):
377377
# {
378378
# 'sheet':'', sheet name
@@ -438,7 +438,7 @@ def inner():
438438
)
439439

440440

441-
@router.post("/uploadDsSchema/{id}")
441+
@router.post("/uploadDsSchema/{id}", response_model=None, summary=f"{PLACEHOLDER_PREFIX}ds_upload_ds_schema")
442442
async def upload_ds_schema(session: SessionDep, id: int = Path(..., description=f"{PLACEHOLDER_PREFIX}ds_id"),
443443
file: UploadFile = File(...)):
444444
ALLOWED_EXTENSIONS = {"xlsx", "xls"}

backend/apps/swagger/i18n.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ def load_translation(lang: str) -> Dict[str, str]:
9393
"name": "CustomPrompt",
9494
"description": f"{PLACEHOLDER_PREFIX}custom_prompt_api"
9595
},
96-
96+
{
97+
"name": "mcp",
98+
"description": f"{PLACEHOLDER_PREFIX}mcp_api"
99+
},
97100
]
98101

99102

backend/apps/swagger/locales/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"ds_preview_data": "Preview Data",
2323
"ds_upload_excel": "Upload Excel",
2424
"ds_excel": "File",
25+
"ds_export_ds_schema": "Export Comment",
26+
"ds_upload_ds_schema": "Upload Comment",
27+
28+
"mcp_api": "MCP Tools(It is not recommended to call via API)",
2529

2630
"system": "System Management",
2731
"system_user_api": "User APIs",

backend/apps/swagger/locales/zh.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"ds_preview_data": "预览数据",
2323
"ds_upload_excel": "上传Excel",
2424
"ds_excel": "文件",
25+
"ds_export_ds_schema": "导出备注信息",
26+
"ds_upload_ds_schema": "导入备注信息",
27+
28+
"mcp_api": "MCP Tools(不建议api方式调用)",
2529

2630
"system": "系统管理",
2731
"system_user_api": "用户接口",

0 commit comments

Comments
 (0)