From cbbddad13ce694853f0ee5735603cd1e843d603b Mon Sep 17 00:00:00 2001 From: Athanasius Date: Tue, 27 Sep 2022 14:09:24 +0100 Subject: [PATCH] schemas/journal: Add `gamebuild` to header as well --- schemas/journal-README.md | 18 ++++++++++++++++-- schemas/journal-v1.0.json | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/schemas/journal-README.md b/schemas/journal-README.md index 99f56eb..2924876 100644 --- a/schemas/journal-README.md +++ b/schemas/journal-README.md @@ -73,12 +73,26 @@ You **MUST** always add this field **to the header object**. 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. + 2. If `gameversion` is present in the `LoadGame` event, as in 4.0 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"`. +#### gamebuild +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 `build` value 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 `build` is present in the `LoadGame` event, as in 4.0 clients, use + its value. + 3. If `LoadGame` does not have a `build` element, as with 3.8 Horizons + clients (up to at least `3.8.0.407`), you **MUST** set `gamebuild`, 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 6e7dd33..d01fafa 100644 --- a/schemas/journal-v1.0.json +++ b/schemas/journal-v1.0.json @@ -21,6 +21,11 @@ "minLength" : 1, "description" : "From Fileheader event if available, else LoadGame if available there." }, + "gamebuild": { + "type" : "string", + "minLength" : 1, + "description" : "The `build` value from a Fileheader event if available, else LoadGame if available there." + }, "softwareName": { "type" : "string" },