update scan endpoints

This commit is contained in:
Space Admiral 2022-12-17 09:32:19 -08:00
parent cbcf07190d
commit 19728e019c
3 changed files with 119 additions and 69 deletions

34
models/ScannedSystem.json Normal file
View File

@ -0,0 +1,34 @@
{
"description": "",
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1
},
"sectorSymbol": {
"type": "string",
"minLength": 1
},
"type": {
"$ref": "./SystemType.json"
},
"x": {
"type": "integer"
},
"y": {
"type": "integer"
},
"distance": {
"type": "integer"
}
},
"required": [
"symbol",
"sectorSymbol",
"type",
"x",
"y",
"distance"
]
}

View File

@ -6,10 +6,18 @@
}, },
"type": { "type": {
"$ref": "./WaypointType.json" "$ref": "./WaypointType.json"
},
"x": {
"type": "integer"
},
"y": {
"type": "integer"
} }
}, },
"required": [ "required": [
"symbol", "symbol",
"type" "type",
"x",
"y"
] ]
} }

View File

@ -1738,7 +1738,7 @@
] ]
} }
}, },
"/my/ships/{shipSymbol}/scan": { "/my/ships/{shipSymbol}/scan/systems": {
"parameters": [ "parameters": [
{ {
"in": "path", "in": "path",
@ -1750,43 +1750,8 @@
} }
], ],
"post": { "post": {
"description": "Activate your ship's sensor arrays to scan for arriving ships, departing ships, system information, or waypoint information. Send a scan mode to select the type of scan performed by your ship.", "description": "Activate your ship's sensor arrays to scan for system information.",
"operationId": "create-ship-scan", "operationId": "create-ship-system-scan",
"requestBody": {
"content": {
"application/json": {
"examples": {
"Approaching Ships": {
"value": {
"mode": "APPROACHING_SHIPS"
}
},
"Departing Ships": {
"value": {
"mode": "DEPARTING_SHIPS"
}
}
},
"schema": {
"properties": {
"mode": {
"enum": [
"APPROACHING_SHIPS",
"DEPARTING_SHIPS",
"WAYPOINT"
],
"type": "string"
}
},
"required": [
"mode"
],
"type": "object"
}
}
},
"description": ""
},
"responses": { "responses": {
"201": { "201": {
"content": { "content": {
@ -1795,38 +1760,20 @@
"description": "", "description": "",
"properties": { "properties": {
"data": { "data": {
"oneOf": [ "properties": {
{ "cooldown": {
"properties": { "$ref": "../models/Cooldown.json"
"cooldown": {
"$ref": "../models/Cooldown.json"
},
"ships": {
"items": {
"$ref": "../models/ScannedShip.json"
},
"type": "array"
}
},
"required": [
"ships",
"cooldown"
]
}, },
{ "systems": {
"properties": { "items": {
"cooldown": { "$ref": "../models/ScannedSystem.json"
"$ref": "../models/Cooldown.json"
},
"waypoint": {
"$ref": "../models/Waypoint.json"
}
}, },
"required": [ "type": "array"
"cooldown",
"waypoint"
]
} }
},
"required": [
"cooldown",
"systems"
], ],
"type": "object" "type": "object"
} }
@ -1846,7 +1793,68 @@
"AgentToken": [] "AgentToken": []
} }
], ],
"summary": "Scan", "summary": "Scan Systems",
"tags": [
"fleet"
]
}
},
"/my/ships/{shipSymbol}/scan/ships": {
"parameters": [
{
"in": "path",
"name": "shipSymbol",
"required": true,
"schema": {
"type": "string"
}
}
],
"post": {
"description": "Activate your ship's sensor arrays to scan for ship information.",
"operationId": "create-ship-ship-scan",
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"description": "",
"properties": {
"data": {
"properties": {
"cooldown": {
"$ref": "../models/Cooldown.json"
},
"ships": {
"items": {
"$ref": "../models/ScannedShip.json"
},
"type": "array"
}
},
"required": [
"cooldown",
"ships"
],
"type": "object"
}
},
"required": [
"data"
],
"type": "object"
}
}
},
"description": "Created"
}
},
"security": [
{
"AgentToken": []
}
],
"summary": "Scan Ships",
"tags": [ "tags": [
"fleet" "fleet"
] ]