From 64dd5832d4ea1c7e2b2b4d638b636bd59702a8fc Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 29 Jan 2022 16:56:08 +0000 Subject: [PATCH] schemas: Journal event template: Couple `StarPos` instructions --- schemas/TEMPLATES/journalevent-README.md | 5 +++-- schemas/TEMPLATES/journalevent-v1.0.json | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/schemas/TEMPLATES/journalevent-README.md b/schemas/TEMPLATES/journalevent-README.md index 78fe032..e56aa9d 100644 --- a/schemas/TEMPLATES/journalevent-README.md +++ b/schemas/TEMPLATES/journalevent-README.md @@ -48,10 +48,11 @@ data contains a `SystemAddress` value, 2. and a `StarPos` array is *not already present* in the source data. - then you MUST include the `StarPos` section in `Augmentations`. + then you MUST include the `StarPos` section in `Augmentations` and add + `StarPos` to the `required` message properties in the Schema file. If neither key is in the source data then remove the `StarPos` section from - this document. + this document and the Schema file. The line: diff --git a/schemas/TEMPLATES/journalevent-v1.0.json b/schemas/TEMPLATES/journalevent-v1.0.json index 7e044cb..143f47b 100644 --- a/schemas/TEMPLATES/journalevent-v1.0.json +++ b/schemas/TEMPLATES/journalevent-v1.0.json @@ -30,7 +30,9 @@ # 'messages'. If all you did was remove these comments you would NOT have # a valid JSON file. You should be adding **at least** one additional # pertinent 'message' key:value definition. -# 9. You MUST NOT remove the 'disallowed' key, or edit its value. The purpose +# 9. Consult the journalevent-README.md file, particularly the section about +# `StarPos` and remove that section of this file if it is not needed. +# 10. You MUST NOT remove the 'disallowed' key, or edit its value. The purpose # of this is to be cited as the allowed value on a disallowed key. As it # defines that the only valid type for the value is **not** any of the # possible JSON types, its effect is to disallow any value for the key, and @@ -87,6 +89,13 @@ "type" : "boolean", "description" : "Boolean value copied from the Journal LoadGame event, when it is present there." }, + "StarPos": { + "type" : "array", + "items" : { "type": "number" }, + "minItems" : 3, + "maxItems" : 3, + "description" : "Must be added by the sender" + }, "some_disallowed_key" { "$ref" : "#/definitions/disallowed" }, } }