Files
FunMD_Convert/批量导入目录树.json
2026-01-07 17:18:26 +08:00

202 lines
5.1 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"openapi": "3.0.1",
"info": {
"title": "默认模块",
"description": "认证授权微服务API文档支持用户管理、角色管理、登录认证等功能",
"version": "1.0.0",
"contact": {
"name": "开发团队",
"email": "dev@example.com"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"tags": [
{
"name": "文档目录管理"
}
],
"paths": {
"/cms/api/v1/document/directory/import": {
"post": {
"summary": "批量导入目录树",
"deprecated": false,
"description": "根据提供的目录树JSON批量生成目录及文件默认覆盖该版本下的草稿内容",
"operationId": "importDirectoryTree",
"tags": [
"文档目录管理"
],
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DirectoryImportRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/ResultVoid"
}
}
},
"headers": {}
}
},
"security": [
{
"Bearer Authentication": []
}
]
}
}
},
"components": {
"schemas": {
"ResultVoid": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {}
}
}
},
"DirectoryImportFile": {
"required": [
"languageId",
"objectName"
],
"type": "object",
"properties": {
"languageId": {
"type": "integer",
"description": "语言ID",
"format": "int64",
"example": 1
},
"objectName": {
"type": "string",
"description": "MinIO对象名",
"example": "version_1001/dir_10/xxx.md"
},
"fileName": {
"type": "string",
"description": "文件名(用于展示)",
"example": "install.md"
},
"fileSize": {
"type": "integer",
"description": "文件大小(字节)",
"format": "int64",
"example": 1024
}
},
"description": "目录文件信息"
},
"DirectoryImportNode": {
"required": [
"name",
"type"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "目录名称",
"example": "安装指南"
},
"type": {
"type": "string",
"description": "节点类型FOLDER/FILE",
"enum": [
"FOLDER",
"FILE"
],
"example": "FOLDER"
},
"sortOrder": {
"type": "integer",
"description": "排序顺序,值越小越靠前",
"format": "int32",
"example": 100
},
"description": {
"type": "string",
"description": "目录描述仅在FOLDER节点生效",
"example": "该章节包含快速开始说明"
},
"children": {
"type": "array",
"description": "子目录列表(仅在 FOLDER 类型下使用)",
"items": {
"$ref": "#/components/schemas/DirectoryImportNode"
}
},
"files": {
"type": "array",
"description": "文件列表(仅在 FILE 类型下使用)",
"items": {
"$ref": "#/components/schemas/DirectoryImportFile"
}
}
},
"description": "目录导入节点"
},
"DirectoryImportRequest": {
"required": [
"tree",
"versionId"
],
"type": "object",
"properties": {
"versionId": {
"type": "integer",
"description": "文档版本ID",
"format": "int64",
"example": 1001
},
"tree": {
"type": "array",
"description": "目录树",
"items": {
"$ref": "#/components/schemas/DirectoryImportNode"
}
}
},
"description": "目录批量导入请求"
}
},
"responses": {},
"securitySchemes": {
"Bearer Authentication": {
"type": "http",
"description": "输入Token格式Bearer {token}",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"servers": [],
"security": [
{
"Bearer Authentication": []
}
]
}