修复swagger
This commit is contained in:
@@ -16,9 +16,24 @@
|
||||
"summary": "获取设备列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/git_huangwc_com_pig_pig-farm-controller_internal_app_controller_device.DeviceResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,9 +63,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/git_huangwc_com_pig_pig-farm-controller_internal_app_controller_device.DeviceResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,9 +104,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/git_huangwc_com_pig_pig-farm-controller_internal_app_controller_device.DeviceResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,9 +155,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/git_huangwc_com_pig_pig-farm-controller_internal_app_controller_device.DeviceResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +194,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体",
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
@@ -163,9 +214,21 @@
|
||||
"summary": "获取计划列表",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 500)",
|
||||
"description": "业务码为200代表成功获取列表",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/plan.ListPlansResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,9 +258,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 500)",
|
||||
"description": "业务码为201代表创建成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/plan.PlanResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,9 +299,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 404, 500)",
|
||||
"description": "业务码为200代表成功获取",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/plan.PlanResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -263,9 +350,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 404, 500)",
|
||||
"description": "业务码为200代表更新成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/plan.PlanResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,7 +389,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 404, 500)",
|
||||
"description": "业务码为200代表删除成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
@@ -319,7 +418,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 404, 500)",
|
||||
"description": "业务码为200代表成功启动计划",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
@@ -348,7 +447,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 404, 500)",
|
||||
"description": "业务码为200代表成功停止计划",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
@@ -382,9 +481,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 409, 500)",
|
||||
"description": "业务码为201代表创建成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/user.CreateUserResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,9 +527,21 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "业务失败,具体错误码和信息见响应体(例如400, 401, 500)",
|
||||
"description": "业务码为200代表登录成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/user.LoginResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -446,7 +569,31 @@
|
||||
}
|
||||
},
|
||||
"device.CreateDeviceRequest": {
|
||||
"type": "object"
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"device.UpdateDeviceRequest": {
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user