add waypoints endpoints

This commit is contained in:
Space Admiral 2022-03-18 16:57:56 -07:00
parent 24b01890ba
commit 3d5ed269f1
2 changed files with 420 additions and 48 deletions

89
models/Waypoint.yaml Normal file
View File

@ -0,0 +1,89 @@
description: ''
type: object
x-examples:
example-1:
system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
examples:
- system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
properties:
system:
type: string
minLength: 1
symbol:
type: string
minLength: 1
type:
type: string
minLength: 1
x:
type: number
'y':
type: number
orbitals:
type: array
items:
type: string
faction:
type: string
minLength: 1
features:
type: array
items:
type: string
traits:
type: array
items:
type: string
charted:
type: boolean
chartedBy:
type:
- string
- 'null'
required:
- system
- symbol
- type
- x
- 'y'
- orbitals
- faction
- features
- traits
- charted

View File

@ -943,6 +943,7 @@ paths:
name: shipSymbol name: shipSymbol
in: path in: path
required: true required: true
description: The ship symbol
post: post:
summary: Deploy Asset summary: Deploy Asset
tags: tags:
@ -967,14 +968,6 @@ paths:
type: string type: string
required: required:
- tradeSymbol - tradeSymbol
requestBody:
content:
application/json:
schema:
type: object
properties:
tradeSymbol:
type: string
'/my/ships/{shipSymbol}/scan': '/my/ships/{shipSymbol}/scan':
parameters: parameters:
- schema: - schema:
@ -2373,17 +2366,16 @@ paths:
exports: exports:
type: array type: array
uniqueItems: true uniqueItems: true
minItems: 1
items: items:
$ref: ../models/MarketTrade.yaml $ref: ../models/MarketTrade.yaml
imports: imports:
type: array type: array
uniqueItems: true uniqueItems: true
minItems: 1
items: items:
$ref: ../models/MarketTrade.yaml $ref: ../models/MarketTrade.yaml
exchange: exchange:
type: array type: array
uniqueItems: true
items: items:
$ref: ../models/MarketTrade.yaml $ref: ../models/MarketTrade.yaml
required: required:
@ -2407,44 +2399,7 @@ paths:
price: 286 price: 286
tariff: 0 tariff: 0
exchange: [] exchange: []
'': operationId: get-systems-systemSymbol-markets
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
data:
- X1-OE-PM
- X1-OE-PM01
- X1-OE-EL70
meta:
total: 3
page: 1
limit: 20
properties:
data:
type: array
items:
type: string
meta:
$ref: ../models/Meta.yaml
required:
- data
- meta
examples:
Success:
value:
data:
- X1-OE-PM
- X1-OE-PM01
- X1-OE-EL70
meta:
total: 3
page: 1
limit: 20
operationId: get-systems-systemSymbol-markets-marketSymbol
description: |- description: |-
Retrieve a list of all charted markets in the given system. Market data is only available if the waypoint is charted and contains a communications relay. Retrieve a list of all charted markets in the given system. Market data is only available if the waypoint is charted and contains a communications relay.
@ -2549,6 +2504,334 @@ paths:
See `/my/ships/{shipSymbol}/deploy` for deploying relays at a location. See `/my/ships/{shipSymbol}/deploy` for deploying relays at a location.
security: security:
- AgentToken: [] - AgentToken: []
'/systems/{systemSymbol}/waypoints':
parameters:
- schema:
type: string
name: systemSymbol
in: path
required: true
description: The system symbol
get:
summary: List Waypoints
tags:
- systems
responses:
'200':
description: OK
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
data:
- system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-PM01
type: MOON
x: 10
'y': 5
orbitals: []
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
traits:
- WEAK_GRAVITY
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-A005
type: ASTEROID_FIELD
x: -1
'y': -29
orbitals: []
faction: MINERS_COLLECTIVE
features: []
traits:
- COMMON_METAL_DEPOSITS
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-25X
type: JUMP_GATE
x: -38
'y': 47
orbitals: []
faction: SPACERS_GUILD
features: []
traits: []
charted: true
chartedBy: null
meta:
total: 4
page: 1
limit: 20
properties:
data:
type: array
uniqueItems: true
minItems: 1
items:
$ref: ../models/Waypoint.yaml
meta:
$ref: ../models/Meta.yaml
required:
- data
- meta
examples:
Success:
value:
data:
- system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-PM01
type: MOON
x: 10
'y': 5
orbitals: []
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
traits:
- WEAK_GRAVITY
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-A005
type: ASTEROID_FIELD
x: -1
'y': -29
orbitals: []
faction: MINERS_COLLECTIVE
features: []
traits:
- COMMON_METAL_DEPOSITS
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-25X
type: JUMP_GATE
x: -38
'y': 47
orbitals: []
faction: SPACERS_GUILD
features: []
traits: []
charted: true
chartedBy: null
meta:
total: 4
page: 1
limit: 20
operationId: get-systems-systemSymbol-waypoints-waypointSymbol
security:
- AgentToken: []
description: Fetch all of the waypoints for a given system. System must be charted or a ship must be present to return waypoint details.
'/systems/{systemSymbol}/waypoints/{waypointSymbol}':
parameters:
- schema:
type: string
name: systemSymbol
in: path
required: true
description: The system symbol
- schema:
type: string
name: waypointSymbol
in: path
required: true
description: The waypoint symbol
get:
summary: View Waypoint
tags:
- systems
responses:
'200':
description: OK
content:
application/json:
schema:
description: ''
type: object
x-examples:
example-1:
data:
- system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-PM01
type: MOON
x: 10
'y': 5
orbitals: []
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
traits:
- WEAK_GRAVITY
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-A005
type: ASTEROID_FIELD
x: -1
'y': -29
orbitals: []
faction: MINERS_COLLECTIVE
features: []
traits:
- COMMON_METAL_DEPOSITS
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-25X
type: JUMP_GATE
x: -38
'y': 47
orbitals: []
faction: SPACERS_GUILD
features: []
traits: []
charted: true
chartedBy: null
meta:
total: 4
page: 1
limit: 20
properties:
data:
type: array
uniqueItems: true
minItems: 1
items:
$ref: ../models/Waypoint.yaml
meta:
$ref: ../models/Meta.yaml
required:
- data
- meta
examples:
Success:
value:
data:
- system: X1-OE
symbol: X1-OE-PM
type: PLANET
x: 10
'y': 5
orbitals:
- X1-OE-PM01
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
- SHIPYARD
traits:
- OVERCROWDED
- HIGH_TECH
- BUREAUCRATIC
- TRADING_HUB
- TEMPERATE
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-PM01
type: MOON
x: 10
'y': 5
orbitals: []
faction: COMMERCE_REPUBLIC
features:
- MARKETPLACE
traits:
- WEAK_GRAVITY
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-A005
type: ASTEROID_FIELD
x: -1
'y': -29
orbitals: []
faction: MINERS_COLLECTIVE
features: []
traits:
- COMMON_METAL_DEPOSITS
charted: true
chartedBy: null
- system: X1-OE
symbol: X1-OE-25X
type: JUMP_GATE
x: -38
'y': 47
orbitals: []
faction: SPACERS_GUILD
features: []
traits: []
charted: true
chartedBy: null
meta:
total: 4
page: 1
limit: 20
operationId: get-systems-systemSymbol-waypoints
security:
- AgentToken: []
description: View the details of a waypoint.
tags: tags:
- name: ships - name: ships
- name: markets - name: markets