修改api接口定义
This commit is contained in:
100
docs/docs.go
100
docs/docs.go
@@ -459,7 +459,34 @@ const docTemplate = `{
|
||||
"device.CreateDeviceRequest": {
|
||||
"type": "object"
|
||||
},
|
||||
"device.DeviceResponse": {
|
||||
"device.UpdateDeviceRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/controller.Properties"
|
||||
},
|
||||
"sub_type": {
|
||||
"$ref": "#/definitions/models.DeviceSubType"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/models.DeviceType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"git_huangwc_com_pig_pig-farm-controller_internal_app_controller_device.DeviceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
@@ -491,33 +518,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"device.UpdateDeviceRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"location": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"parent_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/controller.Properties"
|
||||
},
|
||||
"sub_type": {
|
||||
"$ref": "#/definitions/models.DeviceSubType"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/models.DeviceType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.DeviceSubType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -588,18 +588,46 @@ const docTemplate = `{
|
||||
"PlanExecutionTypeManual"
|
||||
]
|
||||
},
|
||||
"models.PlanStatus": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"enum": [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"PlanStatusDisabled": "禁用计划",
|
||||
"PlanStatusEnabled": "启用计划",
|
||||
"PlanStatusStopeed": "执行完毕"
|
||||
},
|
||||
"x-enum-descriptions": [
|
||||
"启用计划",
|
||||
"禁用计划",
|
||||
"执行完毕"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"PlanStatusEnabled",
|
||||
"PlanStatusDisabled",
|
||||
"PlanStatusStopeed"
|
||||
]
|
||||
},
|
||||
"models.TaskType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"plan_analysis",
|
||||
"waiting"
|
||||
],
|
||||
"x-enum-comments": {
|
||||
"TaskPlanAnalysis": "解析Plan的Task列表并添加到待执行队列的特殊任务",
|
||||
"TaskTypeWaiting": "等待任务"
|
||||
},
|
||||
"x-enum-descriptions": [
|
||||
"解析Plan的Task列表并添加到待执行队列的特殊任务",
|
||||
"等待任务"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"TaskPlanAnalysis",
|
||||
"TaskTypeWaiting"
|
||||
]
|
||||
},
|
||||
@@ -687,6 +715,14 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"example": "根据温度自动调节风扇和加热器"
|
||||
},
|
||||
"execute_count": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"execute_num": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"execution_type": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -703,6 +739,14 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"example": "猪舍温度控制计划"
|
||||
},
|
||||
"status": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/models.PlanStatus"
|
||||
}
|
||||
],
|
||||
"example": 0
|
||||
},
|
||||
"sub_plans": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user