From 955203c35b0af0215f07e77c1a2c52d97c0f8919 Mon Sep 17 00:00:00 2001 From: Gareth Harper Date: Thu, 23 Sep 2021 11:30:52 +0000 Subject: [PATCH] added codexentry event --- schemas/codexentry-v1.0.json | 122 +++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 schemas/codexentry-v1.0.json diff --git a/schemas/codexentry-v1.0.json b/schemas/codexentry-v1.0.json new file mode 100644 index 0000000..b75a575 --- /dev/null +++ b/schemas/codexentry-v1.0.json @@ -0,0 +1,122 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "https://eddn.edcd.io/schemas/codexentry/1#", + "type" : "object", + "additionalProperties" : false, + "required": [ "$schemaRef", "header", "message" ], + "properties": { + "$schemaRef": { + "type" : "string" + }, + "header": { + "type" : "object", + "additionalProperties" : true, + "required" : [ "uploaderID", "softwareName", "softwareVersion" ], + "properties" : { + "uploaderID": { + "type" : "string" + }, + "softwareName": { + "type" : "string" + }, + "softwareVersion": { + "type" : "string" + }, + "gatewayTimestamp": { + "type" : "string", + "format" : "date-time", + "description" : "Timestamp upon receipt at the gateway. If present, this property will be overwritten by the gateway; submitters are not intended to populate this property." + } + } + }, + "message": { + "type" : "object", + "description" : "Contains all properties from the listed events in the client's journal minus Localised strings and the properties marked below as 'disallowed'", + "additionalProperties" : false, + "required" : [ "timestamp", "event", "System", "StarPos", "SystemAddress", "EntryID" ], + "properties" : { + "timestamp": { + "type" : "string", + "format" : "date-time" + }, + "event": { + "enum" : [ "CodexEntry" ] + }, + "horizons": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has a Horizons pass." + }, + "odyssey": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has an Odyssey expansion." + }, + "System": { + "type" : "string", + "minLength" : 1 + }, + "StarPos": { + "type" : "array", + "items" : { "type": "number" }, + "minItems" : 3, + "maxItems" : 3, + "description" : "Must be added by the sender if not present in the journal event" + }, + "SystemAddress": { + "type" : "integer", + "description" : "Should be added by the sender if not present in the journal event" + }, + "Name": { + "type" : "string", + "minLength" : 1 + }, + "Region": { + "type" : "string", + "minLength" : 1 + }, + "EntryID": { + "type" : "integer" + }, + "Category": { + "type" : "string", + "minLength" : 1 + }, + "Latitude": { + "type" : "number" + }, + "Longitude": { + "type" : "number" + }, + "SubCategory": { + "type" : "string", + "minLength" : 1 + }, + "NearestDestination": { + "type" : "string", + "minLength" : 1 + }, + "IsNewEntry": { + "$ref" : "#/definitions/disallowed", + "description" : "Contains personal data" + }, + "VoucherAmount": { + "$ref" : "#/definitions/disallowed", + "description" : "Contains personal data" + }, + "Traits": { + "$ref" : "#/definitions/disallowed", + "description" : "Contains personal data" + }, + "NewTraitsDiscovered": { + "$ref" : "#/definitions/disallowed", + "description" : "Contains personal data" + } + }, + "patternProperties": { + "_Localised$" : { "$ref" : "#/definitions/disallowed" } + } + } + }, + "definitions": { + "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } + } +}