swag
This commit is contained in:
@@ -79,15 +79,74 @@ definitions:
|
||||
x-enum-varnames:
|
||||
- DeviceTypeAreaController
|
||||
- DeviceTypeDevice
|
||||
models.PlanContentType:
|
||||
enum:
|
||||
- sub_plans
|
||||
- tasks
|
||||
type: string
|
||||
x-enum-comments:
|
||||
PlanContentTypeSubPlans: 计划包含子计划
|
||||
PlanContentTypeTasks: 计划包含任务
|
||||
x-enum-descriptions:
|
||||
- 计划包含子计划
|
||||
- 计划包含任务
|
||||
x-enum-varnames:
|
||||
- PlanContentTypeSubPlans
|
||||
- PlanContentTypeTasks
|
||||
models.PlanExecutionType:
|
||||
enum:
|
||||
- automatic
|
||||
- manual
|
||||
type: string
|
||||
x-enum-comments:
|
||||
PlanExecutionTypeAutomatic: 自动执行 (包含定时和循环)
|
||||
PlanExecutionTypeManual: 手动执行
|
||||
x-enum-descriptions:
|
||||
- 自动执行 (包含定时和循环)
|
||||
- 手动执行
|
||||
x-enum-varnames:
|
||||
- PlanExecutionTypeAutomatic
|
||||
- PlanExecutionTypeManual
|
||||
models.TaskType:
|
||||
enum:
|
||||
- waiting
|
||||
type: string
|
||||
x-enum-comments:
|
||||
TaskTypeWaiting: 等待任务
|
||||
x-enum-descriptions:
|
||||
- 等待任务
|
||||
x-enum-varnames:
|
||||
- TaskTypeWaiting
|
||||
plan.CreatePlanRequest:
|
||||
properties:
|
||||
content_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanContentType'
|
||||
example: tasks
|
||||
cron_expression:
|
||||
example: 0 0 6 * * *
|
||||
type: string
|
||||
description:
|
||||
example: 根据温度自动调节风扇和加热器
|
||||
type: string
|
||||
execution_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanExecutionType'
|
||||
example: automatic
|
||||
name:
|
||||
example: 猪舍温度控制计划
|
||||
type: string
|
||||
sub_plan_ids:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
tasks:
|
||||
items:
|
||||
$ref: '#/definitions/plan.TaskRequest'
|
||||
type: array
|
||||
required:
|
||||
- content_type
|
||||
- execution_type
|
||||
- name
|
||||
type: object
|
||||
plan.ListPlansResponse:
|
||||
@@ -102,24 +161,121 @@ definitions:
|
||||
type: object
|
||||
plan.PlanResponse:
|
||||
properties:
|
||||
content_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanContentType'
|
||||
example: tasks
|
||||
cron_expression:
|
||||
example: 0 0 6 * * *
|
||||
type: string
|
||||
description:
|
||||
example: 根据温度自动调节风扇和加热器
|
||||
type: string
|
||||
execution_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanExecutionType'
|
||||
example: automatic
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
name:
|
||||
example: 猪舍温度控制计划
|
||||
type: string
|
||||
sub_plans:
|
||||
items:
|
||||
$ref: '#/definitions/plan.SubPlanResponse'
|
||||
type: array
|
||||
tasks:
|
||||
items:
|
||||
$ref: '#/definitions/plan.TaskResponse'
|
||||
type: array
|
||||
type: object
|
||||
plan.SubPlanResponse:
|
||||
properties:
|
||||
child_plan:
|
||||
$ref: '#/definitions/plan.PlanResponse'
|
||||
child_plan_id:
|
||||
example: 2
|
||||
type: integer
|
||||
execution_order:
|
||||
example: 1
|
||||
type: integer
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
parent_plan_id:
|
||||
example: 1
|
||||
type: integer
|
||||
type: object
|
||||
plan.TaskRequest:
|
||||
properties:
|
||||
description:
|
||||
example: 打开1号风扇
|
||||
type: string
|
||||
execution_order:
|
||||
example: 1
|
||||
type: integer
|
||||
name:
|
||||
example: 打开风扇
|
||||
type: string
|
||||
parameters:
|
||||
$ref: '#/definitions/controller.Properties'
|
||||
type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.TaskType'
|
||||
example: waiting
|
||||
type: object
|
||||
plan.TaskResponse:
|
||||
properties:
|
||||
description:
|
||||
example: 打开1号风扇
|
||||
type: string
|
||||
execution_order:
|
||||
example: 1
|
||||
type: integer
|
||||
id:
|
||||
example: 1
|
||||
type: integer
|
||||
name:
|
||||
example: 打开风扇
|
||||
type: string
|
||||
parameters:
|
||||
$ref: '#/definitions/controller.Properties'
|
||||
plan_id:
|
||||
example: 1
|
||||
type: integer
|
||||
type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.TaskType'
|
||||
example: waiting
|
||||
type: object
|
||||
plan.UpdatePlanRequest:
|
||||
properties:
|
||||
content_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanContentType'
|
||||
example: tasks
|
||||
cron_expression:
|
||||
example: 0 0 6 * * *
|
||||
type: string
|
||||
description:
|
||||
example: 更新后的描述
|
||||
type: string
|
||||
execution_type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/models.PlanExecutionType'
|
||||
example: automatic
|
||||
name:
|
||||
example: 猪舍温度控制计划V2
|
||||
type: string
|
||||
sub_plan_ids:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
tasks:
|
||||
items:
|
||||
$ref: '#/definitions/plan.TaskRequest'
|
||||
type: array
|
||||
type: object
|
||||
user.CreateUserRequest:
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user