Files
Web_UploadTest_Rcu_Dev/spec/rcu-upgrade-flow.yaml
XuJiacheng 99279006a2 refactor(api): 将WebChatUpgrade接口更新为Upgrade_V2并调整相关字段
更新API端点从WebChatUpgrade改为Upgrade_V2,同时将响应字段Data更名为Message
修改涉及README文档、API规范、控制器和客户端代码,保持接口变更的一致性
2026-01-21 17:02:20 +08:00

184 lines
4.1 KiB
YAML

openapi: 3.1.0
info:
title: RCU Upgrade Service Spec
version: 1.0.0
description: Specification for RCU Upgrade Service API interactions and data models.
paths:
/api/Upgrade_V2:
post:
summary: Trigger Upgrade
operationId: triggerUpgrade
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UpgradeRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeResponse'
/api/QueryUpdateHostProgressBar:
post:
summary: Query Upgrade Status
operationId: queryUpgradeStatus
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/QueryRequest'
responses:
'200':
description: Status response
content:
application/json:
schema:
$ref: '#/components/schemas/QueryResponse'
components:
schemas:
UpgradeRequest:
type: object
properties:
roomtype_id:
type: integer
description: Room Type ID
host_list_str:
type: string
description: JSON string array of Host IDs (e.g., "[1,2,3]")
fileName:
type: string
description: Firmware filename
required:
- roomtype_id
- host_list_str
- fileName
UpgradeResponse:
type: object
properties:
IsSuccess:
type: boolean
Message:
type: string
required:
- IsSuccess
QueryRequest:
type: object
properties:
HostIDList:
type: string
description: JSON string array of Host IDs (e.g., "[1,2,3]")
required:
- HostIDList
QueryResponse:
type: object
properties:
IsSuccess:
type: boolean
Response:
type: array
items:
$ref: '#/components/schemas/HostStatus'
required:
- IsSuccess
HostStatus:
type: object
properties:
HostID:
type: integer
Upgrade_status:
type: string
enum:
- 升级就绪
- 升级完成
- 升级失败
- 开始下载
- 下载中
- 下载完成
- 校验中
- 校验完成
- RCU升级中
- 超时失败
Upgrade_DateTime:
type: string
format: date-time
UpgradeFileType:
type: string
enum:
- 固件升级
- 配置升级
FileBlockTotalCount:
type: integer
FileCurrentNumber:
type: integer
BaiFenBi:
type: string
FileName:
type: string
Version:
type: string
ConfiguraVersion:
type: string
UpgradeLog:
type: object
description: Schema for database log entry
properties:
start_time:
type: string
format: date-time
roomtype_id:
type: integer
host_str:
type: string
filename:
type: string
status:
type: string
end_time:
type: string
format: date-time
file_type:
type: string
config_version:
type: string
firmware_version:
type: string
uuid:
type: string
format: uuid
UpgradeConfigGroup:
type: object
properties:
hosts:
type: array
items:
type: integer
roomtypes:
type: array
minItems: 2
maxItems: 2
items:
$ref: '#/components/schemas/UpgradeConfigRoomtype'
required:
- hosts
- roomtypes
UpgradeConfigRoomtype:
type: object
properties:
roomtype_id:
type: integer
fileName:
type: string
required:
- roomtype_id
- fileName