From bf05c4fb495299d3de4882578683e18b36c86b37 Mon Sep 17 00:00:00 2001 From: SpaceAdmiral Date: Fri, 11 Mar 2022 17:55:54 -0800 Subject: [PATCH] Modified 4 files --- models/ScannedShip.yaml | 47 +++++++++ models/ShipNavigation.yaml | 33 ++++++ models/Trade.yaml | 29 ++++++ reference/SpaceTraders.yaml | 196 +++++++++--------------------------- 4 files changed, 159 insertions(+), 146 deletions(-) create mode 100644 models/ScannedShip.yaml create mode 100644 models/ShipNavigation.yaml create mode 100644 models/Trade.yaml diff --git a/models/ScannedShip.yaml b/models/ScannedShip.yaml new file mode 100644 index 0000000..3e9af22 --- /dev/null +++ b/models/ScannedShip.yaml @@ -0,0 +1,47 @@ +description: '' +type: object +properties: + symbol: + type: string + minLength: 1 + registration: + type: object + properties: + factionSymbol: + type: string + minLength: 1 + role: + type: string + minLength: 1 + required: + - factionSymbol + - role + frameSymbol: + type: string + minLength: 1 + reactorSymbol: + type: string + minLength: 1 + engineSymbol: + type: string + minLength: 1 + expiration: + type: string + minLength: 1 +required: + - symbol + - registration + - frameSymbol + - reactorSymbol + - engineSymbol + - expiration +x-examples: + example-1: + symbol: SPACERS_GUILD-65E1BA + registration: + factionSymbol: SPACERS_GUILD + role: EXCAVATOR + frameSymbol: FRAME_LIGHT_FREIGHTER + reactorSymbol: REACTOR_FUSION_I + engineSymbol: ENGINE_ION_DRIVE_I + expiration: '2022-03-12T00:44:14.222Z' diff --git a/models/ShipNavigation.yaml b/models/ShipNavigation.yaml new file mode 100644 index 0000000..f4b1c3d --- /dev/null +++ b/models/ShipNavigation.yaml @@ -0,0 +1,33 @@ +description: '' +type: object +properties: + shipSymbol: + type: string + minLength: 1 + departure: + type: string + minLength: 1 + destination: + type: string + minLength: 1 + durationRemaining: + type: number + arrivedAt: {} +required: + - shipSymbol + - departure + - destination + - durationRemaining +x-examples: + example-1: + shipSymbol: 3AE434-1 + departure: X1-OE-PM + destination: X1-OE-A005 + durationRemaining: 2159 + arrivedAt: null +examples: + - shipSymbol: 3AE434-1 + departure: X1-OE-PM + destination: X1-OE-A005 + durationRemaining: 2159 + arrivedAt: null diff --git a/models/Trade.yaml b/models/Trade.yaml new file mode 100644 index 0000000..cd4ca48 --- /dev/null +++ b/models/Trade.yaml @@ -0,0 +1,29 @@ +description: '' +type: object +properties: + waypointSymbol: + type: string + minLength: 1 + tradeSymbol: + type: string + minLength: 1 + credits: + type: number + units: + type: number +required: + - waypointSymbol + - tradeSymbol + - credits + - units +x-examples: + example-1: + waypointSymbol: X1-OE-PM + tradeSymbol: MICROPROCESSORS + credits: -843 + units: 1 +examples: + - waypointSymbol: X1-OE-PM + tradeSymbol: MICROPROCESSORS + credits: 843 + units: 1 diff --git a/reference/SpaceTraders.yaml b/reference/SpaceTraders.yaml index 75f9c0d..5f75823 100644 --- a/reference/SpaceTraders.yaml +++ b/reference/SpaceTraders.yaml @@ -791,27 +791,6 @@ paths: schema: description: '' type: object - properties: - data: - type: object - properties: - waypointSymbol: - type: string - minLength: 1 - tradeSymbol: - type: string - minLength: 1 - credits: - type: number - units: - type: number - required: - - waypointSymbol - - tradeSymbol - - credits - - units - required: - - data x-examples: example-1: data: @@ -819,6 +798,11 @@ paths: tradeSymbol: MICROPROCESSORS credits: -843 units: 1 + properties: + data: + $ref: ../models/Trade.yaml + required: + - data examples: Success: value: @@ -899,56 +883,6 @@ paths: schema: description: '' type: object - properties: - data: - type: object - properties: - ships: - type: array - uniqueItems: true - minItems: 1 - items: - required: - - symbol - - frameSymbol - - reactorSymbol - - engineSymbol - - expiration - properties: - symbol: - type: string - minLength: 1 - registration: - type: object - properties: - factionSymbol: - type: string - minLength: 1 - role: - type: string - minLength: 1 - required: - - factionSymbol - - role - frameSymbol: - type: string - minLength: 1 - reactorSymbol: - type: string - minLength: 1 - engineSymbol: - type: string - minLength: 1 - expiration: - type: string - minLength: 1 - cooldown: - type: number - required: - - ships - - cooldown - required: - - data x-examples: example-1: data: @@ -1034,6 +968,23 @@ paths: engineSymbol: ENGINE_ION_DRIVE_II expiration: '2022-03-08T05:19:19.726Z' cooldown: 60 + properties: + data: + type: object + required: + - ships + - cooldown + properties: + ships: + type: array + uniqueItems: true + minItems: 1 + items: + $ref: ../models/ScannedShip.yaml + cooldown: + $ref: ../models/Cooldown.yaml + required: + - data examples: Success: value: @@ -1132,6 +1083,9 @@ paths: properties: mode: type: string + enum: + - APPROACHING_SHIPS + - DEPARTING_SHIPS required: - mode examples: @@ -1165,27 +1119,6 @@ paths: schema: description: '' type: object - properties: - data: - type: object - properties: - waypointSymbol: - type: string - minLength: 1 - tradeSymbol: - type: string - minLength: 1 - credits: - type: number - units: - type: number - required: - - waypointSymbol - - tradeSymbol - - credits - - units - required: - - data x-examples: example-1: data: @@ -1193,6 +1126,11 @@ paths: tradeSymbol: SILICON credits: 144 units: -1 + properties: + data: + $ref: ../models/Trade.yaml + required: + - data examples: Success: value: @@ -1286,8 +1224,21 @@ paths: content: application/json: schema: + description: '' type: object - properties: {} + x-examples: + example-1: + data: + shipSymbol: 3AE434-1 + departure: X1-OE-PM + destination: X1-OE-A005 + durationRemaining: 2159 + arrivedAt: null + properties: + data: + $ref: ../models/ShipNavigation.yaml + required: + - data description: Get the status of your last navigation. security: - AgentToken: [] @@ -1844,47 +1795,6 @@ paths: schema: description: '' type: object - properties: - data: - type: object - properties: - symbol: - type: string - minLength: 1 - sector: - type: string - minLength: 1 - type: - type: string - minLength: 1 - x: - type: number - 'y': - type: number - waypoints: - type: array - items: - required: [] - properties: {} - factions: - type: array - items: - required: [] - properties: {} - charted: - type: boolean - chartedBy: {} - required: - - symbol - - sector - - type - - x - - 'y' - - waypoints - - factions - - charted - required: - - data x-examples: example-1: data: @@ -1897,6 +1807,11 @@ paths: factions: [] charted: false chartedBy: null + properties: + data: + $ref: ../models/System.yaml + required: + - data examples: Success: value: @@ -1977,18 +1892,7 @@ paths: items: $ref: ../models/System.yaml meta: - type: object - required: - - total - - page - - limit - properties: - total: - type: number - page: - type: number - limit: - type: number + $ref: ../models/Meta.yaml required: - data - meta