From 627bdd81cf9a990f1f4462d2edc6f2a057df1b95 Mon Sep 17 00:00:00 2001 From: Gareth Harper Date: Wed, 6 Dec 2023 14:22:29 +0000 Subject: [PATCH] added docking denied and granted --- schemas/dockingdenied-README.md | 42 ++++++++++++++++ schemas/dockingdenied-v1.0.json | 82 ++++++++++++++++++++++++++++++++ schemas/dockinggranted-README.md | 42 ++++++++++++++++ schemas/dockinggranted-v1.0.json | 82 ++++++++++++++++++++++++++++++++ 4 files changed, 248 insertions(+) create mode 100644 schemas/dockingdenied-README.md create mode 100644 schemas/dockingdenied-v1.0.json create mode 100644 schemas/dockinggranted-README.md create mode 100644 schemas/dockinggranted-v1.0.json diff --git a/schemas/dockingdenied-README.md b/schemas/dockingdenied-README.md new file mode 100644 index 0000000..665c0cd --- /dev/null +++ b/schemas/dockingdenied-README.md @@ -0,0 +1,42 @@ +# EDDN DockingDenied Schema + +## Introduction +Here we document how to take data from an ED `` Journal +Event and properly structure it for sending to EDDN. + +Please consult [EDDN Schemas README](./README-EDDN-schemas.md) for general +documentation for a schema such as this. + +If you find any discrepancies between what this document says and what is +defined in the relevant Schema file, then you should, in the first instance, +assume that it is the Schema file that is correct. +**PLEASE open +[an issue on GitHub](https://github.com/EDCD/EDDN/issues/new/choose) +to report any such anomalies you find so that we can check and resolve the +discrepancy.** + +## Senders +The primary data source for this schema is the ED Journal event +`DockingDenied`. + +Examples: + +```json +{ + "timestamp":"2022-06-10T10:09:41Z", + "event":"DockingDenied", + "Reason":"RestrictedAccess", + "MarketID":3706117376, + "StationName":"V7G-T1G", + "StationType":"FleetCarrier" +} +``` + +### Augmentations +#### horizons and odyssey flags +Please read [horizons and odyssey flags](../docs/Developers.md#horizons-and-odyssey-flags) +in the Developers' documentation. + +#### gameversion and gamebuild +You **MUST** always set these as per [the relevant section](../docs/Developers.md#gameversions-and-gamebuild) +of the Developers' documentation. diff --git a/schemas/dockingdenied-v1.0.json b/schemas/dockingdenied-v1.0.json new file mode 100644 index 0000000..40fcf39 --- /dev/null +++ b/schemas/dockingdenied-v1.0.json @@ -0,0 +1,82 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "https://eddn.edcd.io/schemas/dockingdenied/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" + }, + "gameversion": { + "type" : "string", + "description" : "From Fileheader event if available, else LoadGame if available there." + }, + "gamebuild": { + "type" : "string", + "description" : "The `build` value from a Fileheader event if available, else LoadGame if available there." + }, + "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 the Localised strings and the properties marked below as 'disallowed'", + "additionalProperties" : false, + "required" : [ "timestamp", "event", "MarketID", "StationName" ], + "properties" : { + "timestamp": { + "type" : "string", + "format" : "date-time" + }, + "event" : { + "enum" : [ "DockingDenied" ] + }, + "horizons": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has a Horizons pass." + }, + "odyssey": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has an Odyssey expansion." + }, + "MarketID": { + "type" : "integer" + }, + "StationName": { + "type" : "string", + "description" : "Name of station" + }, + "StationType": { + "type" : "string", + "description" : "Type of station" + }, + "Reason": { + "type" : "string", + "description" : "Reason docking was denied" + } + } + } + }, + "definitions": { + "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } + } +} diff --git a/schemas/dockinggranted-README.md b/schemas/dockinggranted-README.md new file mode 100644 index 0000000..2616bf9 --- /dev/null +++ b/schemas/dockinggranted-README.md @@ -0,0 +1,42 @@ +# EDDN DockingGranted Schema + +## Introduction +Here we document how to take data from an ED `` Journal +Event and properly structure it for sending to EDDN. + +Please consult [EDDN Schemas README](./README-EDDN-schemas.md) for general +documentation for a schema such as this. + +If you find any discrepancies between what this document says and what is +defined in the relevant Schema file, then you should, in the first instance, +assume that it is the Schema file that is correct. +**PLEASE open +[an issue on GitHub](https://github.com/EDCD/EDDN/issues/new/choose) +to report any such anomalies you find so that we can check and resolve the +discrepancy.** + +## Senders +The primary data source for this schema is the ED Journal event +`DockingGranted`. + +Examples: + +```json +{ + "timestamp":"2023-10-01T14:56:34Z", + "event":"DockingGranted", + "LandingPad":41, + "MarketID":3227312896, + "StationName":"Evans Horizons", + "StationType":"Coriolis" +} +``` + +### Augmentations +#### horizons and odyssey flags +Please read [horizons and odyssey flags](../docs/Developers.md#horizons-and-odyssey-flags) +in the Developers' documentation. + +#### gameversion and gamebuild +You **MUST** always set these as per [the relevant section](../docs/Developers.md#gameversions-and-gamebuild) +of the Developers' documentation. diff --git a/schemas/dockinggranted-v1.0.json b/schemas/dockinggranted-v1.0.json new file mode 100644 index 0000000..de70584 --- /dev/null +++ b/schemas/dockinggranted-v1.0.json @@ -0,0 +1,82 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "https://eddn.edcd.io/schemas/dockinggranted/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" + }, + "gameversion": { + "type" : "string", + "description" : "From Fileheader event if available, else LoadGame if available there." + }, + "gamebuild": { + "type" : "string", + "description" : "The `build` value from a Fileheader event if available, else LoadGame if available there." + }, + "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 the Localised strings and the properties marked below as 'disallowed'", + "additionalProperties" : false, + "required" : [ "timestamp", "event", "MarketID", "StationName" ], + "properties" : { + "timestamp": { + "type" : "string", + "format" : "date-time" + }, + "event" : { + "enum" : [ "DockingGranted" ] + }, + "horizons": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has a Horizons pass." + }, + "odyssey": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has an Odyssey expansion." + }, + "MarketID": { + "type" : "integer" + }, + "StationName": { + "type" : "string", + "description" : "Name of station" + }, + "StationType": { + "type" : "string", + "description" : "Type of station" + }, + "LandingPad": { + "type" : "integer", + "description" : "Pad number Cmdr was granted landing to" + } + } + } + }, + "definitions": { + "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } + } +}