New schema for journal entries

This commit is contained in:
Jonathan Harris 2016-08-02 12:37:30 +01:00
parent bff39d1fb1
commit 76b99fad29

60
schemas/journal-v1.0.json Normal file
View File

@ -0,0 +1,60 @@
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"id" : "http://schemas.elite-markets.net/eddn/journal/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" : true,
"required" : [ "timestamp", "event" ],
"properties" : {
"timestamp": {
"type" : "string",
"format" : "date-time"
},
"event" : {
"enum" : [ "Docked", "FSDJump", "Scan" ]
},
"CockpitBreach" : { "$ref" : "#/definitions/disallowed" },
"BoostUsed" : { "$ref" : "#/definitions/disallowed" },
"FuelLevel" : { "$ref" : "#/definitions/disallowed" },
"FuelUsed" : { "$ref" : "#/definitions/disallowed" },
"JumpDist" : { "$ref" : "#/definitions/disallowed" }
},
"patternProperties" : {
"_Localised$" : { "$ref" : "#/definitions/disallowed" }
}
}
},
"definitions": {
"disallowed" : { "not" : { "type": [ "array", "boolean", "integer", "number", "null", "object", "string" ] } }
}
}