change to 3.0.0 for generator support

This commit is contained in:
Joel Brubaker 2022-10-15 21:34:08 -07:00
parent 97853a9dbe
commit 969fa5da18
14 changed files with 52 additions and 267 deletions

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
x-examples: x-examples:
example-1: example-1:
@ -23,8 +23,3 @@ required:
- symbol - symbol
- headquarters - headquarters
- credits - credits
examples:
- accountId: cl0hok34m0003ks0jjql5q8f2
symbol: EMBER
headquarters: X1-OE-PM
credits: 0

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
properties: properties:
id: id:
@ -72,7 +72,7 @@ x-examples:
faction: COMMERCE_REPUBLIC faction: COMMERCE_REPUBLIC
type: PROCUREMENT type: PROCUREMENT
terms: terms:
deadline: "2022-03-11T05:16:59.113Z" deadline: '2022-03-11T05:16:59.113Z'
payment: payment:
onAccepted: 20000 onAccepted: 20000
onFulfilled: 100000 onFulfilled: 100000
@ -83,21 +83,4 @@ x-examples:
fulfilled: 0 fulfilled: 0
accepted: false accepted: false
fulfilled: false fulfilled: false
expiresAt: "2022-03-09T05:16:59.112Z" expiresAt: '2022-03-09T05:16:59.112Z'
examples:
- id: cl0hok38t0014ks0jnoy8o5vh
faction: COMMERCE_REPUBLIC
type: PROCUREMENT
terms:
deadline: "2022-03-11T05:16:59.113Z"
payment:
onAccepted: 20000
onFulfilled: 100000
deliver:
- tradeSymbol: IRON_ORE
destination: X1-OE-PM
units: 10000
fulfilled: 0
accepted: false
fulfilled: false
expiresAt: "2022-03-09T05:16:59.112Z"

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
properties: properties:
data: data:
@ -28,9 +28,3 @@ x-examples:
destination: X1-OE-PM destination: X1-OE-PM
units: 10000 units: 10000
fulfilled: 500 fulfilled: 500
examples:
- data:
tradeSymbol: IRON_ORE
destination: X1-OE-PM
units: 10000
fulfilled: 500

View File

@ -1,18 +0,0 @@
description: ""
type: object
properties:
duration:
type: integer
expiration:
type: string
minLength: 1
required:
- duration
- expiration
x-examples:
example-1:
duration: 119
expiration: "2022-03-12T00:41:29.285Z"
examples:
- duration: 119
expiration: "2022-03-12T00:41:29.285Z"

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
properties: properties:
shipSymbol: shipSymbol:
@ -24,8 +24,3 @@ x-examples:
yield: yield:
tradeSymbol: SILICON tradeSymbol: SILICON
units: 16 units: 16
examples:
- shipSymbol: 4B902A-1
yield:
tradeSymbol: SILICON
units: 16

View File

@ -15,20 +15,6 @@
] ]
} }
}, },
"examples": [
{
"symbol": "COMMERCE_REPUBLIC",
"name": "Commerce Repubic",
"description": "The Commerce Republic takes capital from top tier worlds and invests it into new systems with high potential for growth.",
"headquarters": "X1-OE-PM",
"traits": [
"BUREAUCRATIC",
"CAPITALISTIC",
"GUILD",
"ESTABLISHED"
]
}
],
"properties": { "properties": {
"symbol": { "symbol": {
"type": "string", "type": "string",

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
properties: properties:
total: total:
@ -16,7 +16,3 @@ x-examples:
total: 6 total: 6
page: 1 page: 1
limit: 20 limit: 20
examples:
- total: 10
page: 1
limit: 10

View File

@ -5,11 +5,7 @@
"symbol": { "symbol": {
"type": "string", "type": "string",
"description": "The globally unique identifier of the ship in the following format: `[AGENT_SYMBOL]_[HEX_ID]`", "description": "The globally unique identifier of the ship in the following format: `[AGENT_SYMBOL]_[HEX_ID]`",
"minLength": 8, "minLength": 8
"examples": [
"FALCON_0A1",
"FALCON_00A"
]
}, },
"registration": { "registration": {
"$ref": "./ShipRegistration.json" "$ref": "./ShipRegistration.json"

View File

@ -3,20 +3,10 @@
"description": "The type of cargo item and the number of units.", "description": "The type of cargo item and the number of units.",
"properties": { "properties": {
"symbol": { "symbol": {
"type": "string", "type": "string"
"examples": [
"ORE_COPPER",
"MICROPROCESSORS",
"FOOD"
]
}, },
"name": { "name": {
"type": "string", "type": "string"
"examples": [
"Copper Ore",
"Microprocessors",
"Food"
]
}, },
"units": { "units": {
"type": "integer", "type": "integer",

View File

@ -10,20 +10,12 @@
"name": { "name": {
"type": "string", "type": "string",
"description": "The agent's registered name of the ship", "description": "The agent's registered name of the ship",
"minLength": 1, "minLength": 1
"examples": [
"Red Falcon",
"Black Pearl IV",
"The Flying Dutchman"
]
}, },
"factionSymbol": { "factionSymbol": {
"type": "string", "type": "string",
"description": "The symbol of the faction the ship is registered with", "description": "The symbol of the faction the ship is registered with",
"minLength": 1, "minLength": 1
"examples": [
"F_COMM"
]
}, },
"role": { "role": {
"$ref": "./ShipRole.json" "$ref": "./ShipRole.json"

View File

@ -21,8 +21,3 @@ required:
- signature - signature
- deposits - deposits
- expiration - expiration
examples:
- signature: X1-OE-D2DD38
deposits:
- COPPER_ORE
expiration: '2022-03-08T05:41:55.514Z'

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
x-examples: x-examples:
example-1: example-1:
@ -6,24 +6,7 @@ x-examples:
sector: X1 sector: X1
type: RED_STAR type: RED_STAR
x: 0 x: 0
"y": 0 'y': 0
waypoints:
- X1-OE-PM
- X1-OE-PM01
- X1-OE-A005
- X1-OE-25X
factions:
- COMMERCE_REPUBLIC
- MINERS_COLLECTIVE
- SPACERS_GUILD
charted: true
chartedBy: null
examples:
- symbol: X1-OE
sector: X1
type: RED_STAR
x: 0
"y": 0
waypoints: waypoints:
- X1-OE-PM - X1-OE-PM
- X1-OE-PM01 - X1-OE-PM01
@ -47,7 +30,7 @@ properties:
minLength: 1 minLength: 1
x: x:
type: integer type: integer
"y": 'y':
type: integer type: integer
waypoints: waypoints:
type: array type: array
@ -60,15 +43,13 @@ properties:
charted: charted:
type: boolean type: boolean
chartedBy: chartedBy:
type: type: string
- string
- "null"
required: required:
- symbol - symbol
- sector - sector
- type - type
- x - x
- "y" - 'y'
- waypoints - waypoints
- factions - factions
- charted - charted

View File

@ -1,4 +1,4 @@
description: "" description: ''
type: object type: object
properties: properties:
waypointSymbol: waypointSymbol:
@ -22,8 +22,3 @@ x-examples:
tradeSymbol: MICROPROCESSORS tradeSymbol: MICROPROCESSORS
credits: -843 credits: -843
units: 1 units: 1
examples:
- waypointSymbol: X1-OE-PM
tradeSymbol: MICROPROCESSORS
credits: 843
units: 1

View File

@ -1,9 +1,8 @@
{ {
"openapi": "3.1.0", "openapi": "3.0.0",
"info": { "info": {
"title": "SpaceTraders API", "title": "SpaceTraders API",
"version": "2.0.0-rc.2", "version": "2.0.0-rc.2",
"summary": "[Alpha] SpaceTraders is a multiplayer sci-fi strategy game where you acquire and manage a fleet of ships.",
"contact": { "contact": {
"name": "Joel Brubaker", "name": "Joel Brubaker",
"email": "joel@spacetraders.io" "email": "joel@spacetraders.io"
@ -816,7 +815,7 @@
"$ref": "../models/Extraction.yaml" "$ref": "../models/Extraction.yaml"
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -824,25 +823,6 @@
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"extraction": {
"shipSymbol": "4B902A-1",
"yield": {
"tradeSymbol": "SILICON",
"units": 16
}
},
"cooldown": {
"duration": 119,
"expiration": "2022-03-12T00:41:29.371Z"
}
}
}
}
} }
} }
} }
@ -853,10 +833,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": [ "type": "object",
"object",
"null"
],
"properties": { "properties": {
"survey": { "survey": {
"$ref": "../models/Survey.yaml" "$ref": "../models/Survey.yaml"
@ -922,7 +899,7 @@
], ],
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -1064,7 +1041,7 @@
} }
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -1169,7 +1146,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -1259,7 +1236,7 @@
} }
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -1339,7 +1316,7 @@
], ],
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -1812,7 +1789,7 @@
} }
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
}, },
"required": [ "required": [
@ -1823,7 +1800,7 @@
{ {
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
}, },
"system": { "system": {
"$ref": "../models/System.yaml" "$ref": "../models/System.yaml"
@ -1833,7 +1810,7 @@
{ {
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
}, },
"waypoint": { "waypoint": {
"$ref": "../models/Waypoint.json" "$ref": "../models/Waypoint.json"
@ -1911,7 +1888,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.yaml" "$ref": "../models/Cooldown.json"
} }
} }
} }
@ -2179,7 +2156,12 @@
"description": "Attempt to negotiate with the faction at a waypoint. The request will only succeed if the waypoint is a negotiable location, and your ship is capable of negotiating using an envoy.", "description": "Attempt to negotiate with the faction at a waypoint. The request will only succeed if the waypoint is a negotiable location, and your ship is capable of negotiating using an envoy.",
"tags": [ "tags": [
"ships" "ships"
] ],
"responses": {
"200": {
"description": ""
}
}
} }
}, },
"/my/contracts": { "/my/contracts": {
@ -2544,8 +2526,7 @@
"MINERS_COLLECTIVE", "MINERS_COLLECTIVE",
"SPACERS_GUILD" "SPACERS_GUILD"
], ],
"charted": true, "charted": true
"chartedBy": null
} }
], ],
"meta": { "meta": {
@ -2630,8 +2611,7 @@
"y": 9, "y": 9,
"waypoints": [], "waypoints": [],
"factions": [], "factions": [],
"charted": false, "charted": false
"chartedBy": null
} }
} }
} }
@ -2818,94 +2798,9 @@
"schema": { "schema": {
"description": "", "description": "",
"type": "object", "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": { "properties": {
"data": { "data": {
"type": "array", "$ref": "../models/Waypoint.json"
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "../models/Waypoint.json"
}
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.yaml"
@ -2920,7 +2815,7 @@
} }
} }
}, },
"operationId": "get-systems-systemSymbol-waypoints", "operationId": "get-system-waypoint",
"security": [ "security": [
{ {
"AgentToken": [] "AgentToken": []
@ -3057,7 +2952,12 @@
"tags": [ "tags": [
"factions" "factions"
], ],
"operationId": "get-factions" "operationId": "get-factions",
"responses": {
"200": {
"description": ""
}
}
} }
}, },
"/factions/{factionSymbol}": { "/factions/{factionSymbol}": {
@ -3079,7 +2979,12 @@
"factions" "factions"
], ],
"operationId": "get-factions-factionSymbol", "operationId": "get-factions-factionSymbol",
"description": "View the details of a faction." "description": "View the details of a faction.",
"responses": {
"200": {
"description": ""
}
}
} }
} }
}, },