clean up inconsistency in the docs

This commit is contained in:
Space Admiral 2022-10-22 09:05:01 -07:00
parent 9099a85bb4
commit fb825f60f7
53 changed files with 709 additions and 775 deletions

29
models/Agent.json Normal file
View File

@ -0,0 +1,29 @@
{
"description": "",
"type": "object",
"properties": {
"accountId": {
"type": "string",
"minLength": 1
},
"symbol": {
"type": "string",
"minLength": 1
},
"headquarters": {
"type": "string",
"minLength": 1,
"description": "The headquarters of the agent."
},
"credits": {
"type": "integer",
"description": "The number of credits the agent has available. Credits can be negative if funds have been overdrawn."
}
},
"required": [
"accountId",
"symbol",
"headquarters",
"credits"
]
}

View File

@ -1,25 +0,0 @@
description: ''
type: object
x-examples:
example-1:
accountId: cl0hok34m0003ks0jjql5q8f2
symbol: 2C52AD
headquarters: X1-OE-PM
credits: 0
properties:
accountId:
type: string
minLength: 1
symbol:
type: string
minLength: 1
headquarters:
type: string
minLength: 1
credits:
type: integer
required:
- accountId
- symbol
- headquarters
- credits

View File

@ -1,6 +1,6 @@
{ {
"type": "object", "type": "object",
"description": "The chart of the waypoint, which makes the waypoint visible to other agents.", "description": "The chart of a system or waypoint, which makes the location visible to other agents.",
"properties": { "properties": {
"submittedBy": { "submittedBy": {
"type": "string" "type": "string"

51
models/Contract.json Normal file
View File

@ -0,0 +1,51 @@
{
"description": "",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"factionSymbol": {
"type": "string",
"minLength": 1,
"description": "The symbol of the faction that this contract is for."
},
"type": {
"type": "string",
"enum": [
"PROCUREMENT",
"TRANSPORT",
"SHUTTLE"
]
},
"terms": {
"type": "object",
"$ref": "./ContractTerms.json"
},
"accepted": {
"type": "boolean",
"default": false,
"description": "Whether the contract has been accepted by the agent"
},
"fulfilled": {
"type": "boolean",
"default": false,
"description": "Whether the contract has been fulfilled"
},
"expiration": {
"type": "string",
"format": "date-time",
"description": "The time at which the contract expires"
}
},
"required": [
"id",
"factionSymbol",
"type",
"terms",
"accepted",
"fulfilled",
"expiration"
]
}

View File

@ -1,86 +0,0 @@
description: ''
type: object
properties:
id:
type: string
minLength: 1
faction:
type: string
minLength: 1
type:
type: string
minLength: 1
terms:
type: object
properties:
deadline:
type: string
minLength: 1
payment:
type: object
properties:
onAccepted:
type: integer
onFulfilled:
type: integer
required:
- onAccepted
- onFulfilled
deliver:
type: array
uniqueItems: true
minItems: 1
items:
required:
- tradeSymbol
- destination
- units
- fulfilled
properties:
tradeSymbol:
type: string
minLength: 1
destination:
type: string
minLength: 1
units:
type: integer
fulfilled:
type: integer
required:
- deadline
- payment
- deliver
accepted:
type: boolean
fulfilled:
type: boolean
expiresAt:
type: string
minLength: 1
required:
- id
- faction
- type
- terms
- accepted
- fulfilled
- expiresAt
x-examples:
example-1:
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,30 +0,0 @@
description: ''
type: object
properties:
data:
type: object
properties:
tradeSymbol:
type: string
minLength: 1
destination:
type: string
minLength: 1
units:
type: integer
fulfilled:
type: integer
required:
- tradeSymbol
- destination
- units
- fulfilled
required:
- data
x-examples:
example-1:
data:
tradeSymbol: IRON_ORE
destination: X1-OE-PM
units: 10000
fulfilled: 500

View File

@ -0,0 +1,17 @@
{
"type": "object",
"properties": {
"onAccepted": {
"type": "integer",
"description": "The amount of credits received up front for accepting the contract."
},
"onFulfilled": {
"type": "integer",
"description": "The amount of credits received when the contract is fulfilled."
}
},
"required": [
"onAccepted",
"onFulfilled"
]
}

View File

@ -0,0 +1,30 @@
{
"description": "The details of a procurement contract. Includes the type of good, units needed, and the destination.",
"type": "object",
"properties": {
"tradeSymbol": {
"type": "string",
"description": "The symbol of the trade good to deliver.",
"minLength": 1
},
"destinationSymbol": {
"type": "string",
"description": "The destination where goods need to be delivered.",
"minLength": 1
},
"unitsRequired": {
"type": "integer",
"description": "The number of units that need to be delivered on this contract."
},
"unitsFulfilled": {
"type": "integer",
"description": "The number of units fulfilled on this contract."
}
},
"required": [
"tradeSymbol",
"destinationSymbol",
"unitsRequired",
"unitsFulfilled"
]
}

27
models/ContractTerms.json Normal file
View File

@ -0,0 +1,27 @@
{
"type": "object",
"properties": {
"deadline": {
"type": "string",
"format": "date-time",
"description": "The deadline for the contract."
},
"payment": {
"type": "object",
"$ref": "./ContractPayment.json"
},
"procurement": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"$ref": "./ContractProcurement.json"
}
}
},
"required": [
"deadline",
"payment"
]
}

View File

@ -18,5 +18,10 @@
"description": "The date and time when the cooldown expires in ISO 8601 format", "description": "The date and time when the cooldown expires in ISO 8601 format",
"minimum": 0 "minimum": 0
} }
} },
"required": [
"totalSeconds",
"remainingSeconds",
"expiration"
]
} }

18
models/Extraction.json Normal file
View File

@ -0,0 +1,18 @@
{
"description": "",
"type": "object",
"properties": {
"shipSymbol": {
"type": "string",
"minLength": 1
},
"yield": {
"type": "object",
"$ref": "./ExtractionYield.json"
}
},
"required": [
"shipSymbol",
"yield"
]
}

View File

@ -1,26 +0,0 @@
description: ''
type: object
properties:
shipSymbol:
type: string
minLength: 1
yield:
type: object
properties:
tradeSymbol:
type: string
minLength: 1
units:
type: integer
required:
- tradeSymbol
- units
required:
- shipSymbol
- yield
x-examples:
example-1:
shipSymbol: 4B902A-1
yield:
tradeSymbol: SILICON
units: 16

View File

@ -0,0 +1,17 @@
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1
},
"units": {
"type": "integer",
"description": "The number of units extracted that were placed into the ship's cargo hold."
}
},
"required": [
"symbol",
"units"
]
}

View File

@ -1,20 +1,6 @@
{ {
"description": "", "description": "",
"type": "object", "type": "object",
"x-examples": {
"example-1": {
"symbol": "COMMERCE_REPUBLIC",
"name": "Commerce Repubic",
"description": "",
"headquarters": "X1-OE-PM",
"traits": [
"BUREAUCRATIC",
"CAPITALISTIC",
"GUILD",
"ESTABLISHED"
]
}
},
"properties": { "properties": {
"symbol": { "symbol": {
"type": "string", "type": "string",
@ -35,7 +21,8 @@
"traits": { "traits": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "object",
"$ref": "./FactionTrait.json"
} }
} }
}, },

55
models/FactionTrait.json Normal file
View File

@ -0,0 +1,55 @@
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The unique identifier of the trait.",
"enum": [
"BUREAUCRATIC",
"SECRETIVE",
"CAPITALISTIC",
"INDUSTRIOUS",
"PEACEFUL",
"DISTRUSTFUL",
"WELCOMING",
"ANARCHIST",
"CONFLICTED",
"AUTHORITARIAN",
"OLIGARCHICAL",
"DYNASTIC",
"DEMOCRACTIC",
"DECENTRALIZED",
"SMUGGLERS",
"SCAVENGERS",
"REBELLIOUS",
"EXILES",
"PIRATES",
"RAIDERS",
"CLAN",
"GUILD",
"DOMINION",
"FRINGE",
"FORSAKEN",
"ISOLATED",
"LOCALIZED",
"ESTABLISHED",
"NOTABLE",
"DOMINANT",
"INESCAPABLE"
]
},
"name": {
"type": "string",
"description": "The name of the trait."
},
"description": {
"type": "string",
"description": "A description of the trait."
}
},
"required": [
"symbol",
"name",
"description"
]
}

View File

@ -1,30 +0,0 @@
{
"description": "",
"type": "object",
"properties": {
"shipSymbol": {
"type": "string",
"minLength": 1
},
"destination": {
"type": "string",
"minLength": 1
}
},
"required": [
"shipSymbol",
"destination"
],
"x-examples": {
"example-1": {
"shipSymbol": "1D7FDA-1",
"destination": "00E0B1"
}
},
"examples": [
{
"shipSymbol": "1D7FDA-1",
"destination": "00E0B1"
}
]
}

View File

@ -10,14 +10,26 @@
"type": "array", "type": "array",
"description": "The list of goods that are exported from this market.", "description": "The list of goods that are exported from this market.",
"items": { "items": {
"type": "string" "type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the good."
}
}
} }
}, },
"imports": { "imports": {
"type": "array", "type": "array",
"description": "The list of goods that are sought as imports in this market.", "description": "The list of goods that are sought as imports in this market.",
"items": { "items": {
"type": "string" "type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the good."
}
}
} }
}, },
"transactions": { "transactions": {
@ -34,5 +46,12 @@
"$ref": "./MarketTradeGood.json" "$ref": "./MarketTradeGood.json"
} }
} }
} },
"required": [
"symbol",
"exports",
"imports",
"transactions",
"tradeGoods"
]
} }

View File

@ -7,7 +7,7 @@
}, },
"tradeVolume": { "tradeVolume": {
"type": "integer", "type": "integer",
"description": "The average volume flowing through the market for this type of good.", "description": "The typical volume flowing through the market for this type of good.",
"minimum": 1 "minimum": 1
}, },
"supply": { "supply": {
@ -29,5 +29,12 @@
"description": "The price at which this good is bought.", "description": "The price at which this good is bought.",
"minimum": 0 "minimum": 0
} }
} },
"required": [
"symbol",
"tradeVolume",
"supply",
"purchasePrice",
"sellPrice"
]
} }

View File

@ -23,6 +23,11 @@
"description": "The price per unit of the transaction.", "description": "The price per unit of the transaction.",
"minimum": 1 "minimum": 1
}, },
"totalPrice": {
"type": "integer",
"description": "The total price of the transaction.",
"minimum": 1
},
"shipSymbol": { "shipSymbol": {
"type": "string", "type": "string",
"description": "The symbol of the ship that made the transaction." "description": "The symbol of the ship that made the transaction."
@ -32,5 +37,13 @@
"format": "date-time", "format": "date-time",
"description": "The timestamp of the transaction." "description": "The timestamp of the transaction."
} }
} },
"required": [
"symbol",
"type",
"units",
"pricePerUnit",
"shipSymbol",
"timestamp"
]
} }

27
models/Meta.json Normal file
View File

@ -0,0 +1,27 @@
{
"description": "",
"type": "object",
"properties": {
"total": {
"type": "integer"
},
"page": {
"type": "integer"
},
"limit": {
"type": "integer"
}
},
"required": [
"total",
"page",
"limit"
],
"x-examples": {
"example-1": {
"total": 6,
"page": 1,
"limit": 20
}
}
}

View File

@ -1,18 +0,0 @@
description: ''
type: object
properties:
total:
type: integer
page:
type: integer
limit:
type: integer
required:
- total
- page
- limit
x-examples:
example-1:
total: 6
page: 1
limit: 20

43
models/ScannedShip.json Normal file
View File

@ -0,0 +1,43 @@
{
"description": "The ship that was scanned. Details include information about the ship that could be detected by the scanner.",
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The globally unique identifier of the ship in the following format: `[AGENT_SYMBOL]_[HEX_ID]`",
"minLength": 8
},
"registration": {
"type": "object",
"$ref": "./ShipRegistration.json"
},
"nav": {
"type": "object",
"$ref": "./ShipNav.json"
},
"frame": {
"$ref": "./ShipFrame.json"
},
"reactor": {
"$ref": "./ShipReactor.json"
},
"engine": {
"$ref": "./ShipEngine.json"
},
"mounts": {
"type": "array",
"items": {
"$ref": "./ShipMount.json"
}
}
},
"required": [
"symbol",
"registration",
"nav",
"frame",
"reactor",
"engine",
"mounts"
]
}

View File

@ -1,47 +0,0 @@
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'

View File

@ -45,6 +45,16 @@
} }
}, },
"required": [ "required": [
"symbol" "symbol",
"registration",
"nav",
"crew",
"frame",
"reactor",
"engine",
"modules",
"mounts",
"cargo",
"fuel"
] ]
} }

View File

@ -11,11 +11,11 @@
"description": "The items currently in the cargo hold.", "description": "The items currently in the cargo hold.",
"items": { "items": {
"$ref": "./ShipCargoItem.json" "$ref": "./ShipCargoItem.json"
}
}
}, },
"required": [ "required": [
"capacity", "capacity",
"inventory" "inventory"
] ]
}
}
} }

View File

@ -3,13 +3,16 @@
"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",
"description": "The unique identifier of the cargo item type."
}, },
"name": { "name": {
"type": "string" "type": "string",
"description": "The name of the cargo item type."
}, },
"units": { "units": {
"type": "integer", "type": "integer",
"description": "The number of units of the cargo item.",
"minimum": 1 "minimum": 1
} }
}, },

View File

@ -1,12 +1,5 @@
{ {
"type": "object", "type": "object",
"required": [
"count",
"min",
"max",
"rotation",
"morale"
],
"description": "The ship's crew service and maintain the ship's systems and equipment.", "description": "The ship's crew service and maintain the ship's systems and equipment.",
"properties": { "properties": {
"count": { "count": {
@ -41,5 +34,13 @@
"description": "The amount of credits per crew member paid per minute of time travelled between waypoints. Wages are paid when a ship departs from a waypoint.", "description": "The amount of credits per crew member paid per minute of time travelled between waypoints. Wages are paid when a ship departs from a waypoint.",
"minimum": 0 "minimum": 0
} }
} },
"required": [
"count",
"min",
"max",
"rotation",
"morale",
"wages"
]
} }

View File

@ -12,13 +12,7 @@
] ]
}, },
"name": { "name": {
"type": "string", "type": "string"
"enum": [
"Impulse Drive",
"Ion Drive",
"Advanced Ion Drive",
"Hyper Drive"
]
}, },
"condition": { "condition": {
"$ref": "./ShipCondition.json" "$ref": "./ShipCondition.json"
@ -30,5 +24,11 @@
"requirements": { "requirements": {
"$ref": "./ShipRequirements.json" "$ref": "./ShipRequirements.json"
} }
} },
"required": [
"symbol",
"name",
"speed",
"requirements"
]
} }

View File

@ -21,22 +21,7 @@
] ]
}, },
"name": { "name": {
"type": "string", "type": "string"
"enum": [
"Drone",
"Interceptor",
"Racer",
"Fighter",
"Frigate",
"Shuttle",
"Explorer",
"Light Freighter",
"Heavy Freighter",
"Transport",
"Destroyer",
"Cruiser",
"Carrier"
]
}, },
"condition": { "condition": {
"$ref": "./ShipCondition.json" "$ref": "./ShipCondition.json"
@ -56,5 +41,13 @@
"requirements": { "requirements": {
"$ref": "./ShipRequirements.json" "$ref": "./ShipRequirements.json"
} }
} },
"required": [
"symbol",
"name",
"moduleSlots",
"mountingPoints",
"fuelCapacity",
"requirements"
]
} }

View File

@ -31,5 +31,9 @@
"timestamp" "timestamp"
] ]
} }
} },
"required": [
"amount",
"capacity"
]
} }

View File

@ -15,19 +15,15 @@
] ]
}, },
"name": { "name": {
"type": "string", "type": "string"
"enum": [
"Fuel Tank",
"Cargo Hold",
"Crew Quarters",
"Envoy Quarters",
"Passenger Cabin",
"Micro Refinery",
"Jump Drive"
]
}, },
"requirements": { "requirements": {
"$ref": "./ShipRequirements.json" "$ref": "./ShipRequirements.json"
} }
} },
"required": [
"symbol",
"name",
"requirements"
]
} }

View File

@ -17,21 +17,15 @@
] ]
}, },
"name": { "name": {
"type": "string", "type": "string"
"enum": [
"Gas Siphon I",
"Gas Siphon II",
"Gas Siphon III",
"Sensor Array I",
"Sensor Array II",
"Sensor Array III",
"Mining Laser I",
"Mining Laser II",
"Mining Laser III"
]
}, },
"requirements": { "requirements": {
"$ref": "./ShipRequirements.json" "$ref": "./ShipRequirements.json"
} }
} },
"required": [
"symbol",
"name",
"requirements"
]
} }

View File

@ -2,6 +2,10 @@
"type": "object", "type": "object",
"description": "The navigation information of the ship.", "description": "The navigation information of the ship.",
"properties": { "properties": {
"waypointSymbol": {
"type": "string",
"description": "The waypoint symbol of the ship's current location, or if the ship is in-transit, the waypoint symbol of the ship's destination."
},
"route": { "route": {
"$ref": "./ShipNavRoute.json" "$ref": "./ShipNavRoute.json"
}, },
@ -13,6 +17,7 @@
} }
}, },
"required": [ "required": [
"waypointSymbol",
"route", "route",
"status", "status",
"speed" "speed"

View File

@ -2,21 +2,13 @@
"type": "object", "type": "object",
"description": "The routing information for the ship's most recent transit or current location.", "description": "The routing information for the ship's most recent transit or current location.",
"properties": { "properties": {
"symbol": { "destination": {
"type": "string", "type": "object",
"description": "The unique identifer of the waypoint." "$ref": "./Waypoint.json"
}, },
"name": { "departure": {
"type": "string", "type": "object",
"description": "The name of the waypoint." "$ref": "./Waypoint.json"
},
"x": {
"type": "integer",
"description": "The x coordinate of the waypoint."
},
"y": {
"type": "integer",
"description": "The y coordinate of the waypoint."
}, },
"arrival": { "arrival": {
"type": "string", "type": "string",
@ -25,10 +17,8 @@
} }
}, },
"required": [ "required": [
"symbol", "destination",
"name", "departure",
"x",
"y",
"arrival" "arrival"
] ]
} }

View File

@ -1,6 +1,6 @@
{ {
"type": "object", "type": "object",
"description": "The reactor of the ship. It is a large, cylindrical structure that is usually located in the center of the ship. The reactor is responsible for powering the ship's systems and weapons.", "description": "The reactor of the ship. The reactor is responsible for powering the ship's systems and weapons.",
"properties": { "properties": {
"symbol": { "symbol": {
"type": "string", "type": "string",
@ -13,14 +13,7 @@
] ]
}, },
"name": { "name": {
"type": "string", "type": "string"
"enum": [
"Solar Reactor",
"Fusion Reactor",
"Fission Reactor",
"Chemical Reactor",
"Dark Matter Reactor"
]
}, },
"condition": { "condition": {
"$ref": "./ShipCondition.json" "$ref": "./ShipCondition.json"
@ -29,11 +22,15 @@
"type": "integer", "type": "integer",
"minimum": 1 "minimum": 1
}, },
"cooldown": {
"$ref": "./Cooldown.json"
},
"requirements": { "requirements": {
"$ref": "./ShipRequirements.json" "$ref": "./ShipRequirements.json"
} }
} },
"required": [
"symbol",
"name",
"condition",
"powerOutput",
"requirements"
]
} }

View File

@ -1,10 +1,5 @@
{ {
"type": "object", "type": "object",
"required": [
"name",
"faction",
"role"
],
"description": "The public registration information of the ship", "description": "The public registration information of the ship",
"properties": { "properties": {
"name": { "name": {
@ -20,5 +15,10 @@
"role": { "role": {
"$ref": "./ShipRole.json" "$ref": "./ShipRole.json"
} }
} },
"required": [
"name",
"faction",
"role"
]
} }

View File

@ -14,5 +14,10 @@
"type": "integer", "type": "integer",
"description": "The number of module slots required for installation." "description": "The number of module slots required for installation."
} }
} },
"required": [
"power",
"crew",
"slots"
]
} }

View File

@ -7,6 +7,13 @@
"description": "The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.", "description": "The symbol of the shipyard. The symbol is the same as the waypoint where the shipyard is located.",
"minLength": 1 "minLength": 1
}, },
"transactions": {
"type": "array",
"description": "The list of recent transactions at this shipyard.",
"items": {
"$ref": "./ShipyardTransaction.json"
}
},
"ships": { "ships": {
"type": "array", "type": "array",
"description": "The ships that are currently available for purchase at the shipyard.", "description": "The ships that are currently available for purchase at the shipyard.",
@ -14,5 +21,9 @@
"$ref": "./ShipyardShip.json" "$ref": "./ShipyardShip.json"
} }
} }
} },
"required": [
"symbol",
"ships"
]
} }

View File

@ -6,7 +6,7 @@
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
}, },
"price": { "purchasePrice": {
"type": "integer" "type": "integer"
}, },
"frame": { "frame": {
@ -30,5 +30,14 @@
"$ref": "./ShipMount.json" "$ref": "./ShipMount.json"
} }
} }
} },
"required": [
"symbol",
"purchasePrice",
"frame",
"reactor",
"engine",
"modules",
"mounts"
]
} }

View File

@ -0,0 +1,29 @@
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the ship that was purchased."
},
"price": {
"type": "integer",
"description": "The price of the transaction.",
"minimum": 1
},
"agentSymbol": {
"type": "string",
"description": "The symbol of the agent that made the transaction."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the transaction."
}
},
"required": [
"symbol",
"price",
"agentSymbol",
"timestamp"
]
}

30
models/Survey.json Normal file
View File

@ -0,0 +1,30 @@
{
"description": "A resource survey of a waypoint, detailing a specific extraction location and the types of resources that can be found there.",
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "A unique signature for the location of this survey. This signature is verified when attempting an extraction using this survey.",
"minLength": 1
},
"deposits": {
"type": "array",
"description": "A list of deposits that can be found at this location.",
"items": {
"type": "object",
"$ref": "./SurveyDeposit.json"
}
},
"expiration": {
"type": "string",
"format": "date-time",
"description": "The date and time when the survey expires. After this date and time, the survey will no longer be available for extraction.",
"minimum": 0
}
},
"required": [
"signature",
"deposits",
"expiration"
]
}

View File

@ -1,23 +0,0 @@
description: ''
type: object
x-examples:
example-1:
signature: X1-OE-D2DD38
deposits:
- COPPER_ORE
expiration: '2022-03-08T05:41:55.514Z'
properties:
signature:
type: string
minLength: 1
deposits:
type: array
items:
type: string
expiration:
type: string
minLength: 1
required:
- signature
- deposits
- expiration

13
models/SurveyDeposit.json Normal file
View File

@ -0,0 +1,13 @@
{
"type": "object",
"description": "A surveyed deposit of a mineral or resource available for extraction.",
"properties": {
"symbol": {
"type": "string",
"description": "The symbol of the deposit."
}
},
"required": [
"symbol"
]
}

63
models/System.json Normal file
View File

@ -0,0 +1,63 @@
{
"description": "",
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1
},
"sectorSymbol": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"NEUTRON_STAR",
"RED_STAR",
"ORANGE_STAR",
"BLUE_STAR",
"YOUNG_STAR",
"WHITE_DWARF",
"BLACK_HOLE",
"HYPERGIANT",
"NEBULA",
"UNSTABLE"
]
},
"x": {
"type": "integer"
},
"y": {
"type": "integer"
},
"waypoints": {
"type": "array",
"items": {
"type": "object",
"$ref": "./SystemWaypoint.json"
}
},
"factions": {
"type": "array",
"items": {
"type": "object",
"$ref": "./SystemFaction.json"
}
},
"chart": {
"type": "object",
"$ref": "./Chart.json"
}
},
"required": [
"symbol",
"sectorSymbol",
"type",
"x",
"y",
"waypoints",
"factions",
"chart"
]
}

View File

@ -1,55 +0,0 @@
description: ''
type: object
x-examples:
example-1:
symbol: X1-OE
sector: X1
type: RED_STAR
x: 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
properties:
symbol:
type: string
minLength: 1
sector:
type: string
minLength: 1
type:
type: string
minLength: 1
x:
type: integer
'y':
type: integer
waypoints:
type: array
items:
type: string
factions:
type: array
items:
type: string
charted:
type: boolean
chartedBy:
type: string
required:
- symbol
- sector
- type
- x
- 'y'
- waypoints
- factions
- charted

12
models/SystemFaction.json Normal file
View File

@ -0,0 +1,12 @@
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1
}
},
"required": [
"symbol"
]
}

View File

@ -0,0 +1,12 @@
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"minLength": 1
}
},
"required": [
"symbol"
]
}

View File

@ -1,24 +0,0 @@
description: ''
type: object
properties:
waypointSymbol:
type: string
minLength: 1
tradeSymbol:
type: string
minLength: 1
credits:
type: integer
units:
type: integer
required:
- waypointSymbol
- tradeSymbol
- credits
- units
x-examples:
example-1:
waypointSymbol: X1-OE-PM
tradeSymbol: MICROPROCESSORS
credits: -843
units: 1

View File

@ -40,7 +40,7 @@
} }
}, },
"chart": { "chart": {
"$ref": "./WaypointChart.json" "$ref": "./Chart.json"
} }
}, },
"required": [ "required": [
@ -51,6 +51,7 @@
"y", "y",
"orbitals", "orbitals",
"factions", "factions",
"traits" "traits",
"chart"
] ]
} }

View File

@ -5,5 +5,8 @@
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
} },
"required": [
"symbol"
]
} }

View File

@ -6,5 +6,8 @@
"type": "string", "type": "string",
"minLength": 1 "minLength": 1
} }
} },
"required": [
"symbol"
]
} }

View File

@ -68,5 +68,10 @@
"type": "string", "type": "string",
"description": "A description of the trait." "description": "A description of the trait."
} }
} },
"required": [
"symbol",
"name",
"description"
]
} }

View File

@ -40,13 +40,13 @@
"description": "A Bearer token for accessing secured API endpoints." "description": "A Bearer token for accessing secured API endpoints."
}, },
"agent": { "agent": {
"$ref": "../models/Agent.yaml" "$ref": "../models/Agent.json"
}, },
"faction": { "faction": {
"$ref": "../models/Faction.json" "$ref": "../models/Faction.json"
}, },
"contract": { "contract": {
"$ref": "../models/Contract.yaml" "$ref": "../models/Contract.json"
}, },
"ship": { "ship": {
"$ref": "../models/Ship.json" "$ref": "../models/Ship.json"
@ -102,7 +102,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Agent.yaml" "$ref": "../models/Agent.json"
} }
} }
}, },
@ -331,7 +331,7 @@
} }
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [
@ -849,7 +849,7 @@
], ],
"properties": { "properties": {
"extraction": { "extraction": {
"$ref": "../models/Extraction.yaml" "$ref": "../models/Extraction.json"
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.json" "$ref": "../models/Cooldown.json"
@ -873,23 +873,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"survey": { "survey": {
"$ref": "../models/Survey.yaml" "$ref": "../models/Survey.json"
}
}
},
"examples": {
"No Survey": {
"value": {}
},
"With Survey": {
"value": {
"survey": {
"signature": "X1-OE-D2DD38",
"deposits": [
"COPPER_ORE"
],
"expiration": "2022-03-08T05:41:55.514Z"
}
} }
} }
} }
@ -1010,7 +994,7 @@
"surveys": { "surveys": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "../models/Survey.yaml" "$ref": "../models/Survey.json"
} }
}, },
"cooldown": { "cooldown": {
@ -1022,70 +1006,6 @@
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"cooldown": {
"duration": 899,
"expiration": "2022-03-12T02:11:35.618Z"
},
"surveys": [
{
"signature": "X1-OE-397C82",
"deposits": [
"SILICON"
],
"expiration": "2022-03-12T02:00:19.622Z"
},
{
"signature": "X1-OE-4413F6",
"deposits": [
"ALUMINUM_ORE",
"ALUMINUM_ORE",
"COPPER_ORE",
"IRON_ORE"
],
"expiration": "2022-03-12T02:20:08.625Z"
},
{
"signature": "X1-OE-E6480F",
"deposits": [
"ALUMINUM_ORE",
"IRON_ORE",
"QUARTZ",
"SILICON"
],
"expiration": "2022-03-12T02:18:00.626Z"
},
{
"signature": "X1-OE-660BE9",
"deposits": [
"ALUMINUM_ORE"
],
"expiration": "2022-03-12T02:20:45.626Z"
},
{
"signature": "X1-OE-D64798",
"deposits": [
"COPPER_ORE",
"QUARTZ",
"SILICON"
],
"expiration": "2022-03-12T02:07:33.626Z"
},
{
"signature": "X1-OE-F799F3",
"deposits": [
"IRON_ORE"
],
"expiration": "2022-03-12T02:23:16.627Z"
}
]
}
}
}
} }
} }
} }
@ -1128,70 +1048,26 @@
"schema": { "schema": {
"description": "", "description": "",
"type": "object", "type": "object",
"x-examples": {
"example-1": {
"data": {
"jump": {
"shipSymbol": "1D7FDA-1",
"destination": "00E0B1"
},
"cooldown": {
"duration": 719,
"expiration": "2022-03-12T00:52:56.735Z"
}
}
}
},
"properties": { "properties": {
"data": { "data": {
"type": "object", "type": "object",
"required": [
"jump",
"cooldown"
],
"properties": { "properties": {
"jump": { "route": {
"type": "object", "$ref": "../models/ShipNavRoute.json"
"required": [
"shipSymbol",
"destination"
],
"properties": {
"shipSymbol": {
"type": "string",
"minLength": 1
},
"destination": {
"type": "string",
"minLength": 1
}
}
}, },
"cooldown": { "cooldown": {
"$ref": "../models/Cooldown.json" "$ref": "../models/Cooldown.json"
} }
} },
"required": [
"route",
"cooldown"
]
} }
}, },
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"jump": {
"shipSymbol": "1D7FDA-1",
"destination": "00E0B1"
},
"cooldown": {
"duration": 719,
"expiration": "2022-03-12T00:52:56.735Z"
}
}
}
}
} }
} }
} }
@ -1232,6 +1108,7 @@
} }
], ],
"post": { "post": {
"description": "Purchase cargo.",
"summary": "Purchase Cargo", "summary": "Purchase Cargo",
"tags": [ "tags": [
"fleet" "fleet"
@ -1244,36 +1121,18 @@
"schema": { "schema": {
"description": "", "description": "",
"type": "object", "type": "object",
"x-examples": {
"example-1": {
"data": {
"waypointSymbol": "X1-OE-PM",
"tradeSymbol": "MICROPROCESSORS",
"credits": -843,
"units": 1
}
}
},
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Trade.yaml" "properties": {
"transaction": {
"$ref": "../models/MarketTransaction.json"
}
}
} }
}, },
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"waypointSymbol": "X1-OE-PM",
"tradeSymbol": "MICROPROCESSORS",
"credits": -843,
"units": 1
}
}
}
} }
} }
} }
@ -1340,24 +1199,16 @@
}, },
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Trade.yaml" "properties": {
"transaction": {
"$ref": "../models/MarketTransaction.json"
}
}
} }
}, },
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"waypointSymbol": "X1-OE-PM",
"tradeSymbol": "SILICON",
"credits": 144,
"units": -1
}
}
}
} }
} }
} }
@ -1666,7 +1517,7 @@
"uniqueItems": true, "uniqueItems": true,
"minItems": 1, "minItems": 1,
"items": { "items": {
"$ref": "../models/ScannedShip.yaml" "$ref": "../models/ScannedShip.json"
} }
}, },
"cooldown": { "cooldown": {
@ -1684,7 +1535,7 @@
"$ref": "../models/Cooldown.json" "$ref": "../models/Cooldown.json"
}, },
"system": { "system": {
"$ref": "../models/System.yaml" "$ref": "../models/System.json"
} }
}, },
"required": [ "required": [
@ -1922,11 +1773,11 @@
"uniqueItems": true, "uniqueItems": true,
"minItems": 1, "minItems": 1,
"items": { "items": {
"$ref": "../models/Contract.yaml" "$ref": "../models/Contract.json"
} }
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [
@ -1973,36 +1824,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Contract.yaml" "$ref": "../models/Contract.json"
}
}
},
"examples": {
"Success": {
"value": {
"data": {
"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"
}
} }
} }
} }
@ -2044,19 +1866,9 @@
"schema": { "schema": {
"description": "", "description": "",
"type": "object", "type": "object",
"x-examples": {
"example-1": {
"data": {
"tradeSymbol": "IRON_ORE",
"destination": "X1-OE-PM",
"units": 10000,
"fulfilled": -30000
}
}
},
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/ContractDelivery.yaml" "$ref": "../models/ContractProcurement.json"
} }
}, },
"required": [ "required": [
@ -2125,7 +1937,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Contract.yaml" "$ref": "../models/Contract.json"
} }
} }
} }
@ -2167,7 +1979,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/Contract.yaml" "$ref": "../models/Contract.json"
} }
} }
} }
@ -2261,49 +2073,17 @@
"uniqueItems": true, "uniqueItems": true,
"minItems": 1, "minItems": 1,
"items": { "items": {
"$ref": "../models/System.yaml" "$ref": "../models/System.json"
} }
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [
"data", "data",
"meta" "meta"
] ]
},
"examples": {
"Success": {
"value": {
"data": [
{
"symbol": "X1-OE",
"sector": "X1",
"type": "RED_STAR",
"x": 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
}
],
"meta": {
"total": 0,
"page": 0,
"limit": 0
}
}
}
} }
} }
} }
@ -2361,28 +2141,12 @@
}, },
"properties": { "properties": {
"data": { "data": {
"$ref": "../models/System.yaml" "$ref": "../models/System.json"
} }
}, },
"required": [ "required": [
"data" "data"
] ]
},
"examples": {
"Success": {
"value": {
"data": {
"symbol": "X1-ZZ",
"sector": "X1",
"type": "BLUE_STAR",
"x": -2,
"y": 9,
"waypoints": [],
"factions": [],
"charted": false
}
}
}
} }
} }
} }
@ -2511,7 +2275,7 @@
} }
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [
@ -2571,7 +2335,7 @@
"$ref": "../models/Waypoint.json" "$ref": "../models/Waypoint.json"
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [
@ -2634,7 +2398,7 @@
} }
}, },
"meta": { "meta": {
"$ref": "../models/Meta.yaml" "$ref": "../models/Meta.json"
} }
}, },
"required": [ "required": [