From 94a8c84e8d29300644a689ce2cd6f537f1993224 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期六, 19 八月 2023 17:41:30 +0800 Subject: [PATCH] plc查询和修改接口 --- docs/swagger.yaml | 142 ++++++++++++++++++++++++++++++++--------------- 1 files changed, 97 insertions(+), 45 deletions(-) diff --git a/docs/swagger.yaml b/docs/swagger.yaml index b251b21..6a2ec4e 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -63,6 +63,44 @@ msg: type: string type: object + model.DevicePlc: + properties: + address: + type: string + brand: + type: string + details: + items: + $ref: '#/definitions/model.DevicePlcAddress' + type: array + frequency: + type: integer + id: + type: integer + isOpen: + type: boolean + method: + type: string + port: + type: integer + portName: + type: string + type: object + model.DevicePlcAddress: + properties: + fieldName: + description: 瀵瑰簲绯荤粺瀛楁 + type: string + length: + description: 鏁版嵁闀垮害 + type: integer + startAddress: + description: 鏁版嵁璧峰鍦板潃 + type: integer + type: + description: 鏁版嵁绫诲瀷 + type: string + type: object model.NetConfig: properties: dns: @@ -178,6 +216,29 @@ name: type: string type: object + request.UpdatePlc: + properties: + address: + type: string + brand: + type: string + details: + items: + $ref: '#/definitions/model.DevicePlcAddress' + type: array + frequency: + type: integer + id: + type: integer + isOpen: + type: boolean + method: + type: string + port: + type: integer + portName: + type: string + type: object request.UpdatePlcBrand: properties: id: @@ -217,50 +278,6 @@ info: contact: {} paths: - /v1/cc/nn: - get: - produces: - - application/json - responses: - "200": - description: 鎴愬姛 - schema: - allOf: - - $ref: '#/definitions/contextx.Response' - - properties: - data: - items: - $ref: '#/definitions/model.NetConfig' - type: array - type: object - summary: 鑾峰彇缃戠粶閰嶇疆 - tags: - - Config - put: - parameters: - - description: 鍙傛暟 - in: body - name: object - required: true - schema: - $ref: '#/definitions/model.NetConfig' - produces: - - application/json - responses: - "200": - description: 鎴愬姛 - schema: - allOf: - - $ref: '#/definitions/contextx.Response' - - properties: - data: - items: - $ref: '#/definitions/response.ProcessParams' - type: array - type: object - summary: 璁剧疆缃戠粶閰嶇疆 - tags: - - Config /v1/config/net: get: produces: @@ -280,7 +297,7 @@ summary: 鑾峰彇缃戠粶閰嶇疆 tags: - Config - put: + post: parameters: - description: 鍙傛暟 in: body @@ -305,6 +322,41 @@ summary: 璁剧疆缃戠粶閰嶇疆 tags: - Config + /v1/config/plc: + get: + produces: + - application/json + responses: + "200": + description: 鎴愬姛 + schema: + allOf: + - $ref: '#/definitions/contextx.Response' + - properties: + data: + $ref: '#/definitions/model.DevicePlc' + type: object + summary: 鑾峰彇plc閰嶇疆 + tags: + - Config + post: + parameters: + - description: 鏌ヨ鍙傛暟 + in: body + name: object + required: true + schema: + $ref: '#/definitions/request.UpdatePlc' + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/contextx.Response' + summary: 鏇存柊plc閰嶇疆 + tags: + - Config /v1/plcBrand/add: post: parameters: -- Gitblit v1.8.0