From aef59ec6cc51cfd9f5db595ef8db358ce94f8e43 Mon Sep 17 00:00:00 2001 From: SpaceAdmiral Date: Thu, 10 Mar 2022 21:33:11 -0800 Subject: [PATCH] Modified 2 files --- models/Ship.yaml | 27 ++++++++++++++ reference/SpaceTraders.yaml | 71 +++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/models/Ship.yaml b/models/Ship.yaml index c9f0761..cf6a2fc 100644 --- a/models/Ship.yaml +++ b/models/Ship.yaml @@ -33,6 +33,30 @@ x-examples: cargo: - tradeSymbol: IRON_ORE units: 100 +examples: + - symbol: 55B261-1 + crew: null + officers: null + fuel: 100 + frame: FRAME_DRONE + reactor: REACTOR_SOLAR_I + engine: ENGINE_SOLAR_PROPULSION + modules: + - MODULE_CARGO_HOLD + mounts: + - MOUNT_MINING_LASER_I + registration: + factionSymbol: COMMERCE_REPUBLIC + agentSymbol: 55B261 + fee: 100 + role: EXCAVATOR + integrity: + frame: 1 + reactor: 1 + engine: 1 + status: DOCKED + location: X1-OE-PM + cargo: [] properties: symbol: type: string @@ -107,6 +131,8 @@ properties: required: - tradeSymbol - units + fuel: + type: number required: - symbol - frame @@ -119,3 +145,4 @@ required: - status - location - cargo + - fuel diff --git a/reference/SpaceTraders.yaml b/reference/SpaceTraders.yaml index 0d6f592..4f7536f 100644 --- a/reference/SpaceTraders.yaml +++ b/reference/SpaceTraders.yaml @@ -1716,6 +1716,77 @@ paths: security: - AgentToken: [] description: List all of your contracts. + '/my/contracts/{contractId}': + parameters: + - schema: + type: string + name: contractId + in: path + required: true + description: The contract ID + get: + summary: Get contract details + tags: + - my + - contracts + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../models/Contract.yaml + 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' + operationId: get-my-contracts-contractId + security: + - AgentToken: [] + description: Get the details of a contract by ID. + '/my/contracts/{contractId}/accept': + parameters: + - schema: + type: string + name: contractId + in: path + required: true + post: + summary: Accept a contract + tags: [] + responses: + '201': + description: Accepted + content: + application/json: + schema: + type: object + properties: + data: + $ref: ../models/Contract.yaml + operationId: post-my-contracts-contractId-accept + security: + - AgentToken: [] + description: Accept a contract. '/systems/{systemSymbol}': parameters: - schema: