From 78e92fb38df6347b0a628e555f1de3342884c419 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Wed, 14 Sep 2022 17:04:34 +0100 Subject: [PATCH] schemas: journal: Implement header->gameversion --- schemas/journal-README.md | 14 ++++++++++++++ schemas/journal-v1.0.json | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/schemas/journal-README.md b/schemas/journal-README.md index c2aa572..99f56eb 100644 --- a/schemas/journal-README.md +++ b/schemas/journal-README.md @@ -65,6 +65,20 @@ The following keys+values should be removed from `Location` event data: - `SquadronFaction` from within the list of `Factions`. ### Augmentations +#### gameversion +You **MUST** always add this field **to the header object**. + +1. If you are using Journal files directly then you **MUST** use the value + of the `gameversion` element from the`Fileheader` event. +2. If you are using the CAPI `/journal` endpoint to retrieve and process + Journal events then: + 1. You will not have `Fileheader` available. + 2. If `gameversion` is present in the `LoadGame` event, as in 4.0 Odyssey + clients, use its value. + 3. If `LoadGame` does not have a `gameversion` element, as with 3.8 Horizons + clients (up to at least `3.8.0.407`), you **MUST** set `gameversion`, but + with the value `"CAPI"`. + #### horizons flag You SHOULD add this key/value pair, using the value from the `LoadGame` event. diff --git a/schemas/journal-v1.0.json b/schemas/journal-v1.0.json index 341c6b5..6e7dd33 100644 --- a/schemas/journal-v1.0.json +++ b/schemas/journal-v1.0.json @@ -16,6 +16,11 @@ "uploaderID": { "type" : "string" }, + "gameversion": { + "type" : "string", + "minLength" : 1, + "description" : "From Fileheader event if available, else LoadGame if available there." + }, "softwareName": { "type" : "string" },