diff --git a/models/ConnectedSystem.json b/models/ConnectedSystem.json new file mode 100644 index 0000000..0d85a0c --- /dev/null +++ b/models/ConnectedSystem.json @@ -0,0 +1,38 @@ +{ + "description": "", + "type": "object", + "properties": { + "symbol": { + "type": "string", + "minLength": 1 + }, + "sectorSymbol": { + "type": "string", + "minLength": 1 + }, + "type": { + "$ref": "./SystemType.json" + }, + "factionSymbol": { + "type": "string", + "description": "The symbol of the faction that owns the connected jump gate in the system." + }, + "x": { + "type": "integer" + }, + "y": { + "type": "integer" + }, + "distance": { + "type": "integer" + } + }, + "required": [ + "symbol", + "sectorSymbol", + "type", + "x", + "y", + "distance" + ] +} \ No newline at end of file diff --git a/models/JumpGate.json b/models/JumpGate.json new file mode 100644 index 0000000..69dad45 --- /dev/null +++ b/models/JumpGate.json @@ -0,0 +1,25 @@ +{ + "type": "object", + "description": "", + "properties": { + "jumpRange": { + "type": "number", + "description": "The maximum jump range of the gate." + }, + "factionSymbol": { + "type": "string", + "description": "The symbol of the faction that owns the gate." + }, + "connectedSystems": { + "type": "array", + "description": "The systems within range of the gate that have a corresponding gate.", + "items": { + "$ref": "./ConnectedSystem.json" + } + } + }, + "required": [ + "jumpRange", + "connectedSystems" + ] +} \ No newline at end of file diff --git a/reference/SpaceTraders.json b/reference/SpaceTraders.json index 7d3a42e..de6c34a 100644 --- a/reference/SpaceTraders.json +++ b/reference/SpaceTraders.json @@ -461,6 +461,62 @@ } ] }, + "/systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate": { + "get": { + "description": "Get jump gate details for a waypoint.", + "operationId": "get-jump-gate", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "$ref": "../models/JumpGate.json" + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "AgentToken": [] + } + ], + "summary": "Get Jump Gate", + "tags": [ + "systems" + ] + }, + "parameters": [ + { + "description": "The system symbol", + "in": "path", + "name": "systemSymbol", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The waypoint symbol", + "in": "path", + "name": "waypointSymbol", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "/factions": { "get": { "description": "List all discovered factions in the game.",