diff --git a/schemas/fsssignaldiscovered-v1.0.json b/schemas/fsssignaldiscovered-v1.0.json index 8d23066..f649e2f 100644 --- a/schemas/fsssignaldiscovered-v1.0.json +++ b/schemas/fsssignaldiscovered-v1.0.json @@ -1,101 +1,103 @@ -{ - "$schema" : "http://json-schema.org/draft-04/schema#", - "id" : "https://eddn.edcd.io/schemas/fsssignaldiscovered/1#", - "description" : "EDDN schema for FSSSignalDiscovered Journal events. Full documentation at https://github.com/EDCD/EDDN/tree/master/schemas/fsssignaldiscovered-README.md", - "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" : [ "event", "signals"], - "properties" : { - "event": { - "enum" : [ "FSSSignalDiscovered" ] - }, - "horizons": { - "type" : "boolean", - "description" : "Whether the sending Cmdr has a Horizons pass." - }, - "odyssey": { - "type" : "boolean", - "description" : "Whether the sending Cmdr has an Odyssey expansion." - }, - "signals": { - "type": "array", - "description": "Array of FSSSignalDiscovered events", - "minItems": 1, - "items": { - "type": "object", - "required": ["SystemAddress", "timestamp", "SignalName"], - "description": "Single FSSSignalDiscovered event", - "properties": { - "SystemAddress": { "type": "integer" }, - "timestamp": { - "type" : "string", - "format" : "date-time" - }, - "SignalName": { "type": "string" }, - "IsStation": { "type": "boolean" }, - "USSType": { - "type": "string", - "not": { - "pattern": "^\\$USS_Type_MissionTarget;$" - } - }, - "TimeRemaining": {"$ref" : "#/definitions/disallowed"}, - "SpawningState": {"type": "string"}, - "SpawningFaction" : {"type": "string"}, - "ThreatLevel": {"type": "integer" }, - - "patternProperties": { - "_Localised$" : { "$ref" : "#/definitions/disallowed" } - } - } - } - }, - "systemName": { - "type" : "string", - "minLength" : 1, - "description": "Should be added by the sender" - }, - "StarPos": { - "type" : "array", - "items" : { "type": "number" }, - "minItems" : 3, - "maxItems" : 3, - "description" : "Should be added by the sender" - } - } - } - }, - "definitions": { - "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } - } -} +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "https://eddn.edcd.io/schemas/fsssignaldiscovered/1#", + "description" : "EDDN schema for FSSSignalDiscovered Journal events. Full documentation at https://github.com/EDCD/EDDN/tree/master/schemas/fsssignaldiscovered-README.md", + "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" : [ "event", "timestamp", "SystemAddress", "StarSystem", "StarPos", "signals"], + "properties" : { + "event": { + "enum" : [ "FSSSignalDiscovered" ] + }, + "horizons": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has a Horizons pass." + }, + "odyssey": { + "type" : "boolean", + "description" : "Whether the sending Cmdr has an Odyssey expansion." + }, + "timestamp": { + "type" : "string", + "format" : "date-time" + }, + "SystemAddress": { + "type": "integer" + }, + "signals": { + "type": "array", + "description": "Array of FSSSignalDiscovered events", + "minItems": 1, + "items": { + "type": "object", + "required": ["SignalName"], + "description": "Single FSSSignalDiscovered event", + "properties": { + "SignalName": { "type": "string" }, + "IsStation": { "type": "boolean" }, + "USSType": { + "type": "string", + "not": { + "pattern": "^\\$USS_Type_MissionTarget;$" + } + }, + "TimeRemaining": {"$ref" : "#/definitions/disallowed"}, + "SpawningState": {"type": "string"}, + "SpawningFaction" : {"type": "string"}, + "ThreatLevel": {"type": "integer" }, + + "patternProperties": { + "_Localised$" : { "$ref" : "#/definitions/disallowed" } + } + } + } + }, + "StarSystem": { + "type" : "string", + "minLength" : 1, + "description": "Should be added by the sender" + }, + "StarPos": { + "type" : "array", + "items" : { "type": "number" }, + "minItems" : 3, + "maxItems" : 3, + "description" : "Should be added by the sender" + } + } + } + }, + "definitions": { + "disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } } + } +}