From f87d820196afaeb26fa4b0062749afd1a8f0ca2d Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Thu, 19 Oct 2023 15:38:36 +0800 Subject: [PATCH] =?UTF-8?q?signal=20=E6=95=85=E9=9A=9C=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 64 ++++++++++++++++++++++++++++++++++++++++++++--- docs/swagger.json | 61 +++++++++++++++++++++++++++++++++++++++++++- docs/swagger.yaml | 50 +++++++++++++++++++++++++++++++++++- 3 files changed, 170 insertions(+), 5 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 24f358c..67c1361 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -4971,11 +4970,17 @@ const docTemplate = `{ "aspect", "id", "mapId", + "operation", "simulationId" ], "properties": { "aspect": { - "$ref": "#/definitions/state.Signal_Aspect" + "description": "当操作为Operation.Display时有效,表示显示的信号", + "allOf": [ + { + "$ref": "#/definitions/state.Signal_Aspect" + } + ] }, "id": { "type": "string" @@ -4983,6 +4988,14 @@ const docTemplate = `{ "mapId": { "type": "integer" }, + "operation": { + "description": "信号机操作类型", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Signal_Operation" + } + ] + }, "simulationId": { "type": "string" } @@ -5364,6 +5377,51 @@ const docTemplate = `{ } } }, + "request_proto.Signal_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "x-enum-comments": { + "Signal_Display": "显示操作,如设置绿色、设置红黄色", + "Signal_LightACancelDs": "取消蓝灯断丝故障", + "Signal_LightAFaultDs": "设置蓝灯断丝故障", + "Signal_LightBCancelDs": "取消白灯断丝故障", + "Signal_LightBFaultDs": "设置白灯断丝故障", + "Signal_LightHCancelDs": "取消红灯断丝故障", + "Signal_LightHFaultDs": "设置红灯断丝故障", + "Signal_LightLCancelDs": "取消绿灯断丝故障", + "Signal_LightLFaultDs": "设置绿灯断丝故障", + "Signal_LightUCancelDs": "取消黄灯断丝故障", + "Signal_LightUFaultDs": "设置黄灯断丝故障", + "Signal_Undefined": "未定义" + }, + "x-enum-varnames": [ + "Signal_Undefined", + "Signal_Display", + "Signal_LightHFaultDs", + "Signal_LightUFaultDs", + "Signal_LightLFaultDs", + "Signal_LightAFaultDs", + "Signal_LightBFaultDs", + "Signal_LightHCancelDs", + "Signal_LightUCancelDs", + "Signal_LightLCancelDs", + "Signal_LightACancelDs", + "Signal_LightBCancelDs" + ] + }, "request_proto.TurnoutOperationReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 17e0645..8671b7f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4964,11 +4964,17 @@ "aspect", "id", "mapId", + "operation", "simulationId" ], "properties": { "aspect": { - "$ref": "#/definitions/state.Signal_Aspect" + "description": "当操作为Operation.Display时有效,表示显示的信号", + "allOf": [ + { + "$ref": "#/definitions/state.Signal_Aspect" + } + ] }, "id": { "type": "string" @@ -4976,6 +4982,14 @@ "mapId": { "type": "integer" }, + "operation": { + "description": "信号机操作类型", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Signal_Operation" + } + ] + }, "simulationId": { "type": "string" } @@ -5357,6 +5371,51 @@ } } }, + "request_proto.Signal_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "x-enum-comments": { + "Signal_Display": "显示操作,如设置绿色、设置红黄色", + "Signal_LightACancelDs": "取消蓝灯断丝故障", + "Signal_LightAFaultDs": "设置蓝灯断丝故障", + "Signal_LightBCancelDs": "取消白灯断丝故障", + "Signal_LightBFaultDs": "设置白灯断丝故障", + "Signal_LightHCancelDs": "取消红灯断丝故障", + "Signal_LightHFaultDs": "设置红灯断丝故障", + "Signal_LightLCancelDs": "取消绿灯断丝故障", + "Signal_LightLFaultDs": "设置绿灯断丝故障", + "Signal_LightUCancelDs": "取消黄灯断丝故障", + "Signal_LightUFaultDs": "设置黄灯断丝故障", + "Signal_Undefined": "未定义" + }, + "x-enum-varnames": [ + "Signal_Undefined", + "Signal_Display", + "Signal_LightHFaultDs", + "Signal_LightUFaultDs", + "Signal_LightLFaultDs", + "Signal_LightAFaultDs", + "Signal_LightBFaultDs", + "Signal_LightHCancelDs", + "Signal_LightUCancelDs", + "Signal_LightLCancelDs", + "Signal_LightACancelDs", + "Signal_LightBCancelDs" + ] + }, "request_proto.TurnoutOperationReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index d635f2d..0b711c4 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -223,17 +223,24 @@ definitions: dto.SignalOperationReqDto: properties: aspect: - $ref: '#/definitions/state.Signal_Aspect' + allOf: + - $ref: '#/definitions/state.Signal_Aspect' + description: 当操作为Operation.Display时有效,表示显示的信号 id: type: string mapId: type: integer + operation: + allOf: + - $ref: '#/definitions/request_proto.Signal_Operation' + description: 信号机操作类型 simulationId: type: string required: - aspect - id - mapId + - operation - simulationId type: object dto.SimulationCreateReqDto: @@ -503,6 +510,47 @@ definitions: description: 名称 type: string type: object + request_proto.Signal_Operation: + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + - 9 + - 10 + - 11 + type: integer + x-enum-comments: + Signal_Display: 显示操作,如设置绿色、设置红黄色 + Signal_LightACancelDs: 取消蓝灯断丝故障 + Signal_LightAFaultDs: 设置蓝灯断丝故障 + Signal_LightBCancelDs: 取消白灯断丝故障 + Signal_LightBFaultDs: 设置白灯断丝故障 + Signal_LightHCancelDs: 取消红灯断丝故障 + Signal_LightHFaultDs: 设置红灯断丝故障 + Signal_LightLCancelDs: 取消绿灯断丝故障 + Signal_LightLFaultDs: 设置绿灯断丝故障 + Signal_LightUCancelDs: 取消黄灯断丝故障 + Signal_LightUFaultDs: 设置黄灯断丝故障 + Signal_Undefined: 未定义 + x-enum-varnames: + - Signal_Undefined + - Signal_Display + - Signal_LightHFaultDs + - Signal_LightUFaultDs + - Signal_LightLFaultDs + - Signal_LightAFaultDs + - Signal_LightBFaultDs + - Signal_LightHCancelDs + - Signal_LightUCancelDs + - Signal_LightLCancelDs + - Signal_LightACancelDs + - Signal_LightBCancelDs request_proto.Turnout_Operation: enum: - 0