add jump gate endpoint

This commit is contained in:
Space Admiral 2022-12-23 11:57:37 -05:00
parent 0e97d330af
commit 919a175551
3 changed files with 119 additions and 0 deletions

View File

@ -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"
]
}

25
models/JumpGate.json Normal file
View File

@ -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"
]
}

View File

@ -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": { "/factions": {
"get": { "get": {
"description": "List all discovered factions in the game.", "description": "List all discovered factions in the game.",