信号机操作集成 docs

This commit is contained in:
xzb 2023-10-16 09:44:00 +08:00
parent 83babc12ae
commit 099e1ac7c1
3 changed files with 342 additions and 71 deletions

View File

@ -1235,13 +1235,15 @@ const docTemplate = `{
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -1333,7 +1335,7 @@ const docTemplate = `{
"JwtAuth": []
}
],
"description": "可以通过草稿名称过滤,分页查询草稿",
"description": "可以通过草稿类型过滤,列表查询草稿",
"consumes": [
"application/json"
],
@ -1343,28 +1345,12 @@ const docTemplate = `{
"tags": [
"草稿Api"
],
"summary": "分页查询草稿",
"summary": "列表查询草稿",
"parameters": [
{
"type": "string",
"name": "name",
"type": "integer",
"name": "type",
"in": "query"
},
{
"type": "integer",
"example": 1,
"description": "页码",
"name": "current",
"in": "query",
"required": true
},
{
"type": "integer",
"example": 10,
"description": "页面行数",
"name": "size",
"in": "query",
"required": true
}
],
"responses": {
@ -1502,13 +1488,15 @@ const docTemplate = `{
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -1643,13 +1631,15 @@ const docTemplate = `{
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -2297,6 +2287,11 @@ const docTemplate = `{
],
"summary": "列表查询发布的图形数据",
"parameters": [
{
"type": "string",
"name": "category",
"in": "query"
},
{
"type": "string",
"name": "name",
@ -2306,6 +2301,11 @@ const docTemplate = `{
"type": "string",
"name": "time",
"in": "query"
},
{
"type": "integer",
"name": "type",
"in": "query"
}
],
"responses": {
@ -2907,6 +2907,58 @@ const docTemplate = `{
}
}
},
"/api/v1/simulation/signal/operation": {
"post": {
"security": [
{
"JwtAuth": []
}
],
"description": "ATS测试-信号机操作",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ATS测试仿真Api"
],
"summary": "ATS测试-信号机操作",
"parameters": [
{
"type": "string",
"description": "JWT Token",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "ATS测试仿真-操作信号机",
"name": "SignalOperationReqDto",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SignalOperationReqDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/dto.ErrorDto"
}
}
}
}
},
"/api/v1/simulation/switch/operation": {
"post": {
"security": [
@ -4659,6 +4711,29 @@ const docTemplate = `{
}
}
},
"dto.SignalOperationReqDto": {
"type": "object",
"required": [
"aspect",
"id",
"mapId",
"simulationId"
],
"properties": {
"aspect": {
"$ref": "#/definitions/state.Signal_Aspect"
},
"id": {
"type": "string"
},
"mapId": {
"type": "integer"
},
"simulationId": {
"type": "string"
}
}
},
"dto.SimulationCreateReqDto": {
"type": "object",
"properties": {
@ -4814,12 +4889,14 @@ const docTemplate = `{
"enum": [
0,
1,
2
2,
3
],
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
]
},
"model.AuthAPIPath": {
@ -5057,6 +5134,29 @@ const docTemplate = `{
"type": "string"
}
}
},
"state.Signal_Aspect": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7
],
"x-enum-varnames": [
"Signal_OFF",
"Signal_ON",
"Signal_L",
"Signal_H",
"Signal_U",
"Signal_HU",
"Signal_B",
"Signal_A"
]
}
},
"securityDefinitions": {

View File

@ -1228,13 +1228,15 @@
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -1326,7 +1328,7 @@
"JwtAuth": []
}
],
"description": "可以通过草稿名称过滤,分页查询草稿",
"description": "可以通过草稿类型过滤,列表查询草稿",
"consumes": [
"application/json"
],
@ -1336,28 +1338,12 @@
"tags": [
"草稿Api"
],
"summary": "分页查询草稿",
"summary": "列表查询草稿",
"parameters": [
{
"type": "string",
"name": "name",
"type": "integer",
"name": "type",
"in": "query"
},
{
"type": "integer",
"example": 1,
"description": "页码",
"name": "current",
"in": "query",
"required": true
},
{
"type": "integer",
"example": 10,
"description": "页面行数",
"name": "size",
"in": "query",
"required": true
}
],
"responses": {
@ -1495,13 +1481,15 @@
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -1636,13 +1624,15 @@
"enum": [
0,
1,
2
2,
3
],
"type": "integer",
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
],
"name": "type",
"in": "query"
@ -2290,6 +2280,11 @@
],
"summary": "列表查询发布的图形数据",
"parameters": [
{
"type": "string",
"name": "category",
"in": "query"
},
{
"type": "string",
"name": "name",
@ -2299,6 +2294,11 @@
"type": "string",
"name": "time",
"in": "query"
},
{
"type": "integer",
"name": "type",
"in": "query"
}
],
"responses": {
@ -2900,6 +2900,58 @@
}
}
},
"/api/v1/simulation/signal/operation": {
"post": {
"security": [
{
"JwtAuth": []
}
],
"description": "ATS测试-信号机操作",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ATS测试仿真Api"
],
"summary": "ATS测试-信号机操作",
"parameters": [
{
"type": "string",
"description": "JWT Token",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "ATS测试仿真-操作信号机",
"name": "SignalOperationReqDto",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SignalOperationReqDto"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/dto.ErrorDto"
}
}
}
}
},
"/api/v1/simulation/switch/operation": {
"post": {
"security": [
@ -4652,6 +4704,29 @@
}
}
},
"dto.SignalOperationReqDto": {
"type": "object",
"required": [
"aspect",
"id",
"mapId",
"simulationId"
],
"properties": {
"aspect": {
"$ref": "#/definitions/state.Signal_Aspect"
},
"id": {
"type": "string"
},
"mapId": {
"type": "integer"
},
"simulationId": {
"type": "string"
}
}
},
"dto.SimulationCreateReqDto": {
"type": "object",
"properties": {
@ -4807,12 +4882,14 @@
"enum": [
0,
1,
2
2,
3
],
"x-enum-varnames": [
"PictureType_StationLayout",
"PictureType_Psl",
"PictureType_RelayCabinetLayout"
"PictureType_RelayCabinetLayout",
"PictureType_IBP"
]
},
"model.AuthAPIPath": {
@ -5050,6 +5127,29 @@
"type": "string"
}
}
},
"state.Signal_Aspect": {
"type": "integer",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7
],
"x-enum-varnames": [
"Signal_OFF",
"Signal_ON",
"Signal_L",
"Signal_H",
"Signal_U",
"Signal_HU",
"Signal_B",
"Signal_A"
]
}
},
"securityDefinitions": {

View File

@ -202,6 +202,22 @@ definitions:
description: 新添加的列车的索引
type: string
type: object
dto.SignalOperationReqDto:
properties:
aspect:
$ref: '#/definitions/state.Signal_Aspect'
id:
type: string
mapId:
type: integer
simulationId:
type: string
required:
- aspect
- id
- mapId
- simulationId
type: object
dto.SimulationCreateReqDto:
properties:
mapId:
@ -309,11 +325,13 @@ definitions:
- 0
- 1
- 2
- 3
type: integer
x-enum-varnames:
- PictureType_StationLayout
- PictureType_Psl
- PictureType_RelayCabinetLayout
- PictureType_IBP
model.AuthAPIPath:
properties:
id:
@ -484,6 +502,26 @@ definitions:
description: 名称
type: string
type: object
state.Signal_Aspect:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
type: integer
x-enum-varnames:
- Signal_OFF
- Signal_ON
- Signal_L
- Signal_H
- Signal_U
- Signal_HU
- Signal_B
- Signal_A
host: localhost:9091
info:
contact: {}
@ -1261,6 +1299,7 @@ paths:
- 0
- 1
- 2
- 3
in: query
name: type
type: integer
@ -1268,6 +1307,7 @@ paths:
- PictureType_StationLayout
- PictureType_Psl
- PictureType_RelayCabinetLayout
- PictureType_IBP
produces:
- application/json
responses:
@ -1386,6 +1426,7 @@ paths:
- 0
- 1
- 2
- 3
in: query
name: type
type: integer
@ -1393,6 +1434,7 @@ paths:
- PictureType_StationLayout
- PictureType_Psl
- PictureType_RelayCabinetLayout
- PictureType_IBP
produces:
- application/json
responses:
@ -1445,6 +1487,7 @@ paths:
- 0
- 1
- 2
- 3
in: query
name: type
type: integer
@ -1452,6 +1495,7 @@ paths:
- PictureType_StationLayout
- PictureType_Psl
- PictureType_RelayCabinetLayout
- PictureType_IBP
produces:
- application/json
responses:
@ -1512,22 +1556,10 @@ paths:
get:
consumes:
- application/json
description: 可以通过草稿名称过滤,分页查询草稿
description: 可以通过草稿类型过滤,列表查询草稿
parameters:
- in: query
name: name
type: string
- description: 页码
example: 1
in: query
name: current
required: true
type: integer
- description: 页面行数
example: 10
in: query
name: size
required: true
name: type
type: integer
produces:
- application/json
@ -1550,7 +1582,7 @@ paths:
$ref: '#/definitions/dto.ErrorDto'
security:
- JwtAuth: []
summary: 分页查询草稿
summary: 列表查询草稿
tags:
- 草稿Api
/api/v1/project:
@ -1997,12 +2029,18 @@ paths:
- application/json
description: 可以通过名称过滤
parameters:
- in: query
name: category
type: string
- in: query
name: name
type: string
- in: query
name: time
type: string
- in: query
name: type
type: integer
produces:
- application/json
responses:
@ -2330,6 +2368,39 @@ paths:
summary: 获取ATS测试-操作继电器
tags:
- ATS测试仿真Api
/api/v1/simulation/signal/operation:
post:
consumes:
- application/json
description: ATS测试-信号机操作
parameters:
- description: JWT Token
in: header
name: Authorization
required: true
type: string
- description: ATS测试仿真-操作信号机
in: body
name: SignalOperationReqDto
required: true
schema:
$ref: '#/definitions/dto.SignalOperationReqDto'
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/dto.ErrorDto'
security:
- JwtAuth: []
summary: ATS测试-信号机操作
tags:
- ATS测试仿真Api
/api/v1/simulation/switch/operation:
post:
consumes: