修复swagger
This commit is contained in:
24
docs/docs.go
24
docs/docs.go
@@ -15,7 +15,7 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/devices": {
|
||||
"/api/v1/devices": {
|
||||
"get": {
|
||||
"description": "获取系统中所有设备的列表",
|
||||
"produces": [
|
||||
@@ -67,7 +67,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/devices/{id}": {
|
||||
"/api/v1/devices/{id}": {
|
||||
"get": {
|
||||
"description": "根据设备ID获取单个设备的详细信息",
|
||||
"produces": [
|
||||
@@ -162,7 +162,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans": {
|
||||
"/api/v1/plans": {
|
||||
"get": {
|
||||
"description": "获取所有计划的列表",
|
||||
"produces": [
|
||||
@@ -214,7 +214,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}": {
|
||||
"/api/v1/plans/{id}": {
|
||||
"get": {
|
||||
"description": "根据计划ID获取单个计划的详细信息。",
|
||||
"produces": [
|
||||
@@ -309,7 +309,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}/start": {
|
||||
"/api/v1/plans/{id}/start": {
|
||||
"post": {
|
||||
"description": "根据计划ID启动一个计划的执行。",
|
||||
"produces": [
|
||||
@@ -338,7 +338,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}/stop": {
|
||||
"/api/v1/plans/{id}/stop": {
|
||||
"post": {
|
||||
"description": "根据计划ID停止一个正在执行的计划。",
|
||||
"produces": [
|
||||
@@ -367,7 +367,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"/api/v1/users": {
|
||||
"post": {
|
||||
"description": "根据用户名和密码创建一个新的系统用户。",
|
||||
"consumes": [
|
||||
@@ -401,7 +401,7 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/login": {
|
||||
"/api/v1/users/login": {
|
||||
"post": {
|
||||
"description": "用户使用用户名和密码登录,成功后返回 JWT 令牌。",
|
||||
"consumes": [
|
||||
@@ -655,6 +655,10 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"example": "根据温度自动调节风扇和加热器"
|
||||
},
|
||||
"execute_num": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"execution_type": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -868,6 +872,10 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"example": "更新后的描述"
|
||||
},
|
||||
"execute_num": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"execution_type": {
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/devices": {
|
||||
"/api/v1/devices": {
|
||||
"get": {
|
||||
"description": "获取系统中所有设备的列表",
|
||||
"produces": [
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/devices/{id}": {
|
||||
"/api/v1/devices/{id}": {
|
||||
"get": {
|
||||
"description": "根据设备ID获取单个设备的详细信息",
|
||||
"produces": [
|
||||
@@ -151,7 +151,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans": {
|
||||
"/api/v1/plans": {
|
||||
"get": {
|
||||
"description": "获取所有计划的列表",
|
||||
"produces": [
|
||||
@@ -203,7 +203,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}": {
|
||||
"/api/v1/plans/{id}": {
|
||||
"get": {
|
||||
"description": "根据计划ID获取单个计划的详细信息。",
|
||||
"produces": [
|
||||
@@ -298,7 +298,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}/start": {
|
||||
"/api/v1/plans/{id}/start": {
|
||||
"post": {
|
||||
"description": "根据计划ID启动一个计划的执行。",
|
||||
"produces": [
|
||||
@@ -327,7 +327,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/plans/{id}/stop": {
|
||||
"/api/v1/plans/{id}/stop": {
|
||||
"post": {
|
||||
"description": "根据计划ID停止一个正在执行的计划。",
|
||||
"produces": [
|
||||
@@ -356,7 +356,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"/api/v1/users": {
|
||||
"post": {
|
||||
"description": "根据用户名和密码创建一个新的系统用户。",
|
||||
"consumes": [
|
||||
@@ -390,7 +390,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/users/login": {
|
||||
"/api/v1/users/login": {
|
||||
"post": {
|
||||
"description": "用户使用用户名和密码登录,成功后返回 JWT 令牌。",
|
||||
"consumes": [
|
||||
@@ -644,6 +644,10 @@
|
||||
"type": "string",
|
||||
"example": "根据温度自动调节风扇和加热器"
|
||||
},
|
||||
"execute_num": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"execution_type": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -857,6 +861,10 @@
|
||||
"type": "string",
|
||||
"example": "更新后的描述"
|
||||
},
|
||||
"execute_num": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"execution_type": {
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user