From 0f25a996cf0cf75e53faf1d64fde21938bb7a75d Mon Sep 17 00:00:00 2001 From: SpaceAdmiral Date: Thu, 10 Mar 2022 18:17:28 -0800 Subject: [PATCH] Modified 2 files --- models/System.yaml | 74 +++++++++++++++++++++++++++++++++ reference/SpaceTraders.yaml | 82 +++++++++++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 models/System.yaml diff --git a/models/System.yaml b/models/System.yaml new file mode 100644 index 0000000..9eca407 --- /dev/null +++ b/models/System.yaml @@ -0,0 +1,74 @@ +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 +examples: + - 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: number + 'y': + type: number + waypoints: + type: array + items: + type: string + factions: + type: array + items: + type: string + charted: + type: boolean + chartedBy: + type: + - string + - 'null' +required: + - symbol + - sector + - type + - x + - 'y' + - waypoints + - factions + - charted diff --git a/reference/SpaceTraders.yaml b/reference/SpaceTraders.yaml index 67b00aa..c05938b 100644 --- a/reference/SpaceTraders.yaml +++ b/reference/SpaceTraders.yaml @@ -1413,6 +1413,88 @@ paths: operationId: get-systems-systemSymbol security: - AgentToken: [] + /systems: + get: + summary: List all systems + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + description: '' + type: object + x-examples: + example-1: + 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 + chartedBy: null + - symbol: X1-EV + sector: X1 + type: ORANGE_STAR + x: 3 + 'y': 4 + waypoints: + - X1-EV-A004 + factions: + - COMMERCE_REPUBLIC + charted: true + chartedBy: null + - symbol: X1-ZZ + sector: X1 + type: BLUE_STAR + x: -2 + 'y': 11 + waypoints: [] + factions: [] + charted: false + chartedBy: null + meta: + total: 3 + page: 1 + limit: 20 + properties: + data: + type: array + uniqueItems: true + minItems: 1 + items: + $ref: ../models/System.yaml + meta: + type: object + required: + - total + - page + - limit + properties: + total: + type: number + page: + type: number + limit: + type: number + required: + - data + - meta + operationId: get-systems + description: Return a list of all systems. + security: + - AgentToken: [] tags: - name: my - name: ships