feat: 工作目录支持页面内目录浏览器
This commit is contained in:
@@ -337,6 +337,47 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/system/directories": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"system"
|
||||
],
|
||||
"operationId": "list_directories",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "path",
|
||||
"in": "query",
|
||||
"description": "绝对目录路径;留空表示列出盘符",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Subdirectories of the requested path, or the drive list",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DirectoryListingResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "The path is not an existing absolute directory",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/tasks": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -872,6 +913,56 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DirectoryEntry": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "用于展示的名称"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "绝对路径,选中后回填到表单"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DirectoryListingResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"entries",
|
||||
"truncated"
|
||||
],
|
||||
"properties": {
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/DirectoryEntry"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "上一级目录;盘符根目录和盘符列表为 null"
|
||||
},
|
||||
"path": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"description": "当前目录;为 null 表示正在列出盘符"
|
||||
},
|
||||
"truncated": {
|
||||
"type": "boolean",
|
||||
"description": "条目超过上限被截断时为 true"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ErrorResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user