From aead03901480b803ed691ee2cc5dd38223788f1d Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Sun, 27 Sep 2026 11:54:29 +1000 Subject: [PATCH] Update empire status bodies list schema --- src/spec/components.ts | 77 ++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/src/spec/components.ts b/src/spec/components.ts index 23846b1..214fd88 100644 --- a/src/spec/components.ts +++ b/src/spec/components.ts @@ -287,35 +287,28 @@ export const components = { type: 'object', description: 'The bodies known to the empire, grouped by relationship.', properties: { - colonies: { - type: 'array', - description: 'The colonies owned by the empire.', - items: { + colonies: { $ref: '#/components/schemas/bodies_list' }, + mystations: { $ref: '#/components/schemas/bodies_list' }, + ourstations: { $ref: '#/components/schemas/bodies_list' }, + babies: { + type: 'object', + description: 'Empires that can be managed by this empire, keyed by id', + additionalProperties: { type: 'object', + required: ['id', 'planets', 'sitter_expiry'], properties: { - empire_name: { type: 'string' }, - x: { type: 'integer' }, - name: { type: 'string' }, - empire_id: { type: 'integer' }, - star_id: { type: 'integer' }, - star_name: { type: 'string' }, - y: { type: 'integer' }, - id: { type: 'integer' }, - orbit: { type: 'integer' }, - zone: { type: 'string' }, + id: { type: 'number', description: 'The id of the baby empire' }, + alliance_id: { + type: 'number', + description: 'The id of the alliance the baby empire is a member of', + }, + sitter_expiry: { + type: 'string', + description: + 'The date whereupon this baby will case to be managed by the empire', + }, + planets: { $ref: '#/components/schemas/bodies_list' }, }, - required: [ - 'empire_name', - 'x', - 'name', - 'empire_id', - 'star_id', - 'star_name', - 'y', - 'id', - 'orbit', - 'zone', - ], }, }, }, @@ -354,6 +347,38 @@ export const components = { ], }, + bodies_list: { + type: 'array', + description: 'A list of colonies or stations.', + items: { + type: 'object', + properties: { + empire_name: { type: 'string' }, + x: { type: 'integer' }, + name: { type: 'string' }, + empire_id: { type: 'integer' }, + star_id: { type: 'integer' }, + star_name: { type: 'string' }, + y: { type: 'integer' }, + id: { type: 'integer' }, + orbit: { type: 'integer' }, + zone: { type: 'string' }, + }, + required: [ + 'empire_name', + 'x', + 'name', + 'empire_id', + 'star_id', + 'star_name', + 'y', + 'id', + 'orbit', + 'zone', + ], + }, + }, + building_cost: { type: 'object', description: 'The resource and time cost of a build or upgrade.', -- 2.51.2