feat:CISD配置初始化

This commit is contained in:
waner
2026-03-11 14:23:11 +08:00
parent 1c254aaba9
commit d02c6530e8
58 changed files with 10699 additions and 1281 deletions
+148 -3
View File
@@ -16,6 +16,10 @@
"name": "Device",
"description": "设备信息与状态"
},
{
"name": "File",
"description": "内部文件上传与查询"
},
{
"name": "Init",
"description": "CISD 初始化任务"
@@ -103,6 +107,78 @@
}
}
},
"/api/v1/files/upload": {
"post": {
"tags": [
"File"
],
"summary": "上传文件并返回 fileId",
"operationId": "uploadFile",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponseFileUploadResponse"
}
}
}
}
}
}
},
"/api/v1/files/{fileId}": {
"get": {
"tags": [
"File"
],
"summary": "查询文件元数据",
"operationId": "getFileDetail",
"parameters": [
{
"name": "fileId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "上传接口返回的 fileId"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponseFileDetailResponse"
}
}
}
}
}
}
},
"/api/v1/init/template": {
"get": {
"tags": [
@@ -406,6 +482,36 @@
}
]
},
"ApiResponseFileUploadResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiResponseBase"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/FileUploadResponse"
}
}
}
]
},
"ApiResponseFileDetailResponse": {
"allOf": [
{
"$ref": "#/components/schemas/ApiResponseBase"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/FileDetailResponse"
}
}
}
]
},
"ApiResponseInitPlanTemplateResponse": {
"allOf": [
{
@@ -559,6 +665,45 @@
}
}
},
"FileUploadResponse": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"size": {
"type": "integer",
"format": "int64"
},
"storagePath": {
"type": "string"
}
}
},
"FileDetailResponse": {
"type": "object",
"properties": {
"fileId": {
"type": "string"
},
"originalFilename": {
"type": "string"
},
"storagePath": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"ACTIVE"
]
},
"size": {
"type": "integer",
"format": "int64"
}
}
},
"InitPlanTemplateResponse": {
"type": "object",
"properties": {
@@ -640,7 +785,7 @@
"$ref": "#/components/schemas/InitPreviewRequestDirectTlqConfig"
}
},
"description": "初始化请求体。部分字段为条件必填:\n- DIRECT + RABBITMQ_TLQ 需提供 directTlq\n- DIRECT 需提供 signServer 与 licenses.cfgZipFileId\n- TLQ 模式需提供 mq.tlqLicenseFileId\n- RABBITMQ_CFMQ 需提供 mq.cfmqConfigFileId\n"
"description": "初始化请求体。部分字段为条件必填:\n- 先上传文件到 `/api/v1/files/upload`,再将返回的 `fileId` 填入下述 fileId 字段\n- ENTERPRISE: mq.mqType 仅支持 RABBITMQ 或 TLQ\n- INDIRECT: mq.mqType 仅支持 RABBITMQ 或 RABBITMQ_TLQ\n- DIRECT + RABBITMQ_TLQ 需提供 directTlq\n- DIRECT 需提供 signServer 与 licenses.cfgZipFileId\n- ENTERPRISE + TLQ、INDIRECT + RABBITMQ_TLQ、DIRECT + RABBITMQ_TLQ 需提供 mq.tlqLicenseFileId\n- RABBITMQ_CFMQ 需提供 mq.cfmqConfigFileId\n"
},
"InitPreviewRequestNodes": {
"type": "object",
@@ -676,7 +821,7 @@
"properties": {
"mqType": {
"type": "string",
"description": "ENTERPRISE/INDIRECT: RABBITMQ|TLQ; DIRECT: RABBITMQ_TLQ|RABBITMQ_CFMQ"
"description": "按产品区分的支持方式枚举:\n- ENTERPRISE: RABBITMQ | TLQ\n- INDIRECT: RABBITMQ | RABBITMQ_TLQ\n- DIRECT: RABBITMQ_TLQ | RABBITMQ_CFMQ\n"
},
"channelUsername": {
"type": "string",
@@ -904,4 +1049,4 @@
}
}
}
}
}
+98 -2
View File
@@ -11,6 +11,8 @@ servers:
tags:
- name: Device
description: 设备信息与状态
- name: File
description: 内部文件上传与查询
- name: Init
description: CISD 初始化任务
security:
@@ -60,6 +62,50 @@ paths:
schema:
$ref: "#/components/schemas/ApiResponseDeviceActionResponse"
/api/v1/files/upload:
post:
tags: [File]
summary: 上传文件并返回 fileId
operationId: uploadFile
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
file:
type: string
format: binary
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ApiResponseFileUploadResponse"
/api/v1/files/{fileId}:
get:
tags: [File]
summary: 查询文件元数据
operationId: getFileDetail
parameters:
- name: fileId
in: path
required: true
schema:
type: string
description: 上传接口返回的 fileId
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ApiResponseFileDetailResponse"
/api/v1/init/template:
get:
tags: [Init]
@@ -252,6 +298,22 @@ components:
data:
$ref: "#/components/schemas/DeviceActionResponse"
ApiResponseFileUploadResponse:
allOf:
- $ref: "#/components/schemas/ApiResponseBase"
- type: object
properties:
data:
$ref: "#/components/schemas/FileUploadResponse"
ApiResponseFileDetailResponse:
allOf:
- $ref: "#/components/schemas/ApiResponseBase"
- type: object
properties:
data:
$ref: "#/components/schemas/FileDetailResponse"
ApiResponseInitPlanTemplateResponse:
allOf:
- $ref: "#/components/schemas/ApiResponseBase"
@@ -339,6 +401,33 @@ components:
acceptedAt:
type: string
FileUploadResponse:
type: object
properties:
fileId:
type: string
size:
type: integer
format: int64
storagePath:
type: string
FileDetailResponse:
type: object
properties:
fileId:
type: string
originalFilename:
type: string
storagePath:
type: string
status:
type: string
enum: [ACTIVE]
size:
type: integer
format: int64
InitPlanTemplateResponse:
type: object
properties:
@@ -392,9 +481,12 @@ components:
$ref: "#/components/schemas/InitPreviewRequestDirectTlqConfig"
description: |
初始化请求体。部分字段为条件必填:
- 先上传文件到 `/api/v1/files/upload`,再将返回的 `fileId` 填入下述 fileId 字段
- ENTERPRISE: mq.mqType 仅支持 RABBITMQ 或 TLQ
- INDIRECT: mq.mqType 仅支持 RABBITMQ 或 RABBITMQ_TLQ
- DIRECT + RABBITMQ_TLQ 需提供 directTlq
- DIRECT 需提供 signServer 与 licenses.cfgZipFileId
- TLQ 模式需提供 mq.tlqLicenseFileId
- ENTERPRISE + TLQ、INDIRECT + RABBITMQ_TLQ、DIRECT + RABBITMQ_TLQ 需提供 mq.tlqLicenseFileId
- RABBITMQ_CFMQ 需提供 mq.cfmqConfigFileId
InitPreviewRequestNodes:
@@ -420,7 +512,11 @@ components:
properties:
mqType:
type: string
description: "ENTERPRISE/INDIRECT: RABBITMQ|TLQ; DIRECT: RABBITMQ_TLQ|RABBITMQ_CFMQ"
description: |
按产品区分的支持方式枚举:
- ENTERPRISE: RABBITMQ | TLQ
- INDIRECT: RABBITMQ | RABBITMQ_TLQ
- DIRECT: RABBITMQ_TLQ | RABBITMQ_CFMQ
channelUsername:
type: string
maxLength: 32
File diff suppressed because it is too large Load Diff