修复swagger

This commit is contained in:
2025-09-19 15:55:56 +08:00
parent 3af1b4949f
commit 88e0fbfb64
9 changed files with 187 additions and 63 deletions

View File

@@ -152,6 +152,9 @@ definitions:
description:
example: 根据温度自动调节风扇和加热器
type: string
execute_num:
example: 10
type: integer
execution_type:
allOf:
- $ref: '#/definitions/models.PlanExecutionType'
@@ -294,6 +297,9 @@ definitions:
description:
example: 更新后的描述
type: string
execute_num:
example: 10
type: integer
execution_type:
allOf:
- $ref: '#/definitions/models.PlanExecutionType'
@@ -359,7 +365,7 @@ definitions:
info:
contact: {}
paths:
/devices:
/api/v1/devices:
get:
description: 获取系统中所有设备的列表
produces:
@@ -393,7 +399,7 @@ paths:
summary: 创建新设备
tags:
- 设备管理
/devices/{id}:
/api/v1/devices/{id}:
delete:
description: 根据设备ID删除一个设备软删除
parameters:
@@ -456,7 +462,7 @@ paths:
summary: 更新设备信息
tags:
- 设备管理
/plans:
/api/v1/plans:
get:
description: 获取所有计划的列表
produces:
@@ -490,7 +496,7 @@ paths:
summary: 创建计划
tags:
- 计划管理
/plans/{id}:
/api/v1/plans/{id}:
delete:
description: 根据计划ID删除计划。
parameters:
@@ -553,7 +559,7 @@ paths:
summary: 更新计划
tags:
- 计划管理
/plans/{id}/start:
/api/v1/plans/{id}/start:
post:
description: 根据计划ID启动一个计划的执行。
parameters:
@@ -572,7 +578,7 @@ paths:
summary: 启动计划
tags:
- 计划管理
/plans/{id}/stop:
/api/v1/plans/{id}/stop:
post:
description: 根据计划ID停止一个正在执行的计划。
parameters:
@@ -591,7 +597,7 @@ paths:
summary: 停止计划
tags:
- 计划管理
/users:
/api/v1/users:
post:
consumes:
- application/json
@@ -613,7 +619,7 @@ paths:
summary: 创建新用户
tags:
- 用户管理
/users/login:
/api/v1/users/login:
post:
consumes:
- application/json