mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-05 09:53:03 +03:00
Merge pull request #52 from Marginal/retire_v2
Retire v2 commodities schema and v1 outfitting and shipyard schemas
This commit is contained in:
commit
46c2a732c1
@ -1,96 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema" : "http://json-schema.org/draft-04/schema#",
|
|
||||||
"id" : "http://schemas.elite-markets.net/eddn/commodity/2#",
|
|
||||||
"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",
|
|
||||||
"additionalProperties" : false,
|
|
||||||
"required" : [ "systemName", "stationName", "timestamp", "commodities" ],
|
|
||||||
"properties" : {
|
|
||||||
"systemName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"stationName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"timestamp": {
|
|
||||||
"type" : "string",
|
|
||||||
"format" : "date-time"
|
|
||||||
},
|
|
||||||
"commodities": {
|
|
||||||
"type" : "array",
|
|
||||||
"minItems" : 1,
|
|
||||||
"items" : {
|
|
||||||
"oneOf" : [
|
|
||||||
{
|
|
||||||
"type" : "object",
|
|
||||||
"additionalProperties" : false,
|
|
||||||
"required" : [ "name", "buyPrice", "supply", "sellPrice", "demand" ],
|
|
||||||
"properties" : {
|
|
||||||
"name": {
|
|
||||||
"type" :"string",
|
|
||||||
"minLength" :1
|
|
||||||
},
|
|
||||||
"buyPrice": {
|
|
||||||
"type" :"integer",
|
|
||||||
"description" :"Price to buy from the market"
|
|
||||||
},
|
|
||||||
"supply": {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"supplyLevel": {
|
|
||||||
"$ref" : "#/definitions/levelType"
|
|
||||||
},
|
|
||||||
"sellPrice": {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Price to sell to the market"
|
|
||||||
},
|
|
||||||
"demand":{
|
|
||||||
"type":"integer"
|
|
||||||
},
|
|
||||||
"demandLevel":{
|
|
||||||
"$ref":"#/definitions/levelType"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"definitions": {
|
|
||||||
"levelType": {
|
|
||||||
"enum": [ "Low", "Med", "High" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,121 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema" : "http://json-schema.org/draft-04/schema#",
|
|
||||||
"id" : "http://schemas.elite-markets.net/eddn/outfitting/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",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [ "systemName", "stationName", "timestamp", "modules" ],
|
|
||||||
"properties": {
|
|
||||||
"systemName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"stationName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"timestamp": {
|
|
||||||
"type" : "string",
|
|
||||||
"format" : "date-time"
|
|
||||||
},
|
|
||||||
"modules": {
|
|
||||||
"type" : "array",
|
|
||||||
"description" : "List of available modules in English as displayed in-game. Modules that depend on the Cmdr's purchases (e.g. paintjobs) or rank (e.g. decals and PowerPlay faction-specific modules) should be omitted.",
|
|
||||||
"uniqueItems" : true,
|
|
||||||
"items" : {
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type" : "object",
|
|
||||||
"properties" : {
|
|
||||||
"category" : { "enum": [ "hardpoint" ] },
|
|
||||||
"name" : { "type": "string", "minLength": 1 },
|
|
||||||
"mount" : { "$ref": "#/definitions/mount" },
|
|
||||||
"guidance" : { "$ref": "#/definitions/guidance" },
|
|
||||||
"class" : { "$ref": "#/definitions/class" },
|
|
||||||
"rating" : { "$ref": "#/definitions/rating" }
|
|
||||||
},
|
|
||||||
"required" : [ "category", "name", "mount", "class", "rating" ],
|
|
||||||
"additionalProperties" : false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type" : "object",
|
|
||||||
"properties" : {
|
|
||||||
"category" : { "enum": [ "utility" ] },
|
|
||||||
"name" : { "type": "string", "minLength": 1 },
|
|
||||||
"class" : { "$ref": "#/definitions/class" },
|
|
||||||
"rating" : { "$ref": "#/definitions/rating" }
|
|
||||||
},
|
|
||||||
"required" : [ "category", "name", "class", "rating" ],
|
|
||||||
"additionalProperties" : false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type" : "object",
|
|
||||||
"properties" : {
|
|
||||||
"category" : { "enum": [ "standard" ] },
|
|
||||||
"name" : { "type": "string", "minLength": 1 },
|
|
||||||
"ship" : { "type": "string",
|
|
||||||
"minLength" : 1,
|
|
||||||
"description" : "For ship-specific modules (e.g. armour) must be one of the ship names defined in http://schemas.elite-markets.net/eddn/shipyard/1" },
|
|
||||||
"class" : { "$ref": "#/definitions/class" },
|
|
||||||
"rating" : { "$ref": "#/definitions/rating" }
|
|
||||||
},
|
|
||||||
"required" : [ "category", "name", "class", "rating" ],
|
|
||||||
"additionalProperties" : false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type" : "object",
|
|
||||||
"properties" : {
|
|
||||||
"category" : { "enum": [ "internal" ] },
|
|
||||||
"name" : { "type": "string", "minLength": 1 },
|
|
||||||
"class" : { "$ref": "#/definitions/class" },
|
|
||||||
"rating" : { "$ref": "#/definitions/rating" }
|
|
||||||
},
|
|
||||||
"required" : [ "category", "name", "class", "rating" ],
|
|
||||||
"additionalProperties" : false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"definitions": {
|
|
||||||
"class": {
|
|
||||||
"enum": [ "0", "1", "2", "3", "4", "5", "6", "7", "8" ]
|
|
||||||
},
|
|
||||||
"rating": {
|
|
||||||
"enum": [ "I", "A", "B", "C", "D", "E", "F", "G", "H" ]
|
|
||||||
},
|
|
||||||
"mount": {
|
|
||||||
"enum": [ "Fixed", "Gimballed", "Turreted" ],
|
|
||||||
"description": "Weapon mounting mode"
|
|
||||||
},
|
|
||||||
"guidance": {
|
|
||||||
"enum": [ "Dumbfire", "Seeker" ],
|
|
||||||
"description": "Missile and Torpedo weapon guidance mode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema" : "http://json-schema.org/draft-04/schema#",
|
|
||||||
"id" : "http://schemas.elite-markets.net/eddn/shipyard/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",
|
|
||||||
"additionalProperties" : false,
|
|
||||||
"required" : [ "systemName", "stationName", "timestamp", "ships" ],
|
|
||||||
"properties" : {
|
|
||||||
"systemName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"stationName": {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1
|
|
||||||
},
|
|
||||||
"timestamp": {
|
|
||||||
"type" : "string",
|
|
||||||
"format" : "date-time"
|
|
||||||
},
|
|
||||||
"ships": {
|
|
||||||
"type" : "array",
|
|
||||||
"uniqueItems" : true,
|
|
||||||
"items" : {
|
|
||||||
"type" : "string",
|
|
||||||
"minLength" : 1,
|
|
||||||
"description" : "Ship name in English as displayed in-game. i.e. one of: Adder, Anaconda, Asp, Asp Scout, Cobra Mk III, Cobra MkIV, DiamondBack Scout, Diamondback Explorer, Eagle, Federal Assault Ship, Federal Corvette, Federal Dropship, Federal Gunship, Fer-de-Lance, Hauler, Imperial Clipper, Imperial Courier, Imperial Cutter, Imperial Eagle, Keelback, Orca, Python, Sidewinder, Type-6 Transporter, Type-7 Transporter, Type-9 Heavy, Viper, Viper MkIV, Vulture"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -39,18 +39,12 @@ class _Settings(object):
|
|||||||
GATEWAY_IP_KEY_SALT = None
|
GATEWAY_IP_KEY_SALT = None
|
||||||
|
|
||||||
GATEWAY_JSON_SCHEMAS = {
|
GATEWAY_JSON_SCHEMAS = {
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/2": "schemas/commodity-v2.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/2/test": "schemas/commodity-v2.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/3": "schemas/commodity-v3.0.json",
|
"http://schemas.elite-markets.net/eddn/commodity/3": "schemas/commodity-v3.0.json",
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/3/test": "schemas/commodity-v3.0.json",
|
"http://schemas.elite-markets.net/eddn/commodity/3/test": "schemas/commodity-v3.0.json",
|
||||||
|
|
||||||
"http://schemas.elite-markets.net/eddn/shipyard/1": "schemas/shipyard-v1.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/shipyard/1/test": "schemas/shipyard-v1.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/shipyard/2": "schemas/shipyard-v2.0.json",
|
"http://schemas.elite-markets.net/eddn/shipyard/2": "schemas/shipyard-v2.0.json",
|
||||||
"http://schemas.elite-markets.net/eddn/shipyard/2/test": "schemas/shipyard-v2.0.json",
|
"http://schemas.elite-markets.net/eddn/shipyard/2/test": "schemas/shipyard-v2.0.json",
|
||||||
|
|
||||||
"http://schemas.elite-markets.net/eddn/outfitting/1": "schemas/outfitting-v1.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/outfitting/1/test": "schemas/outfitting-v1.0.json",
|
|
||||||
"http://schemas.elite-markets.net/eddn/outfitting/2": "schemas/outfitting-v2.0.json",
|
"http://schemas.elite-markets.net/eddn/outfitting/2": "schemas/outfitting-v2.0.json",
|
||||||
"http://schemas.elite-markets.net/eddn/outfitting/2/test": "schemas/outfitting-v2.0.json",
|
"http://schemas.elite-markets.net/eddn/outfitting/2/test": "schemas/outfitting-v2.0.json",
|
||||||
|
|
||||||
@ -58,12 +52,18 @@ class _Settings(object):
|
|||||||
"http://schemas.elite-markets.net/eddn/blackmarket/1/test": "schemas/blackmarket-v1.0.json",
|
"http://schemas.elite-markets.net/eddn/blackmarket/1/test": "schemas/blackmarket-v1.0.json",
|
||||||
|
|
||||||
"http://schemas.elite-markets.net/eddn/journal/1": "schemas/journal-v1.0.json",
|
"http://schemas.elite-markets.net/eddn/journal/1": "schemas/journal-v1.0.json",
|
||||||
"http://schemas.elite-markets.net/eddn/journal/1/test": "schemas/journal-v1.0.json"
|
"http://schemas.elite-markets.net/eddn/journal/1/test": "schemas/journal-v1.0.json",
|
||||||
}
|
}
|
||||||
|
|
||||||
GATEWAY_OUTDATED_SCHEMAS = [
|
GATEWAY_OUTDATED_SCHEMAS = [
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/1",
|
"http://schemas.elite-markets.net/eddn/commodity/1",
|
||||||
"http://schemas.elite-markets.net/eddn/commodity/1/test"
|
"http://schemas.elite-markets.net/eddn/commodity/1/test",
|
||||||
|
"http://schemas.elite-markets.net/eddn/commodity/2",
|
||||||
|
"http://schemas.elite-markets.net/eddn/commodity/2/test",
|
||||||
|
"http://schemas.elite-markets.net/eddn/outfitting/1",
|
||||||
|
"http://schemas.elite-markets.net/eddn/outfitting/1/test",
|
||||||
|
"http://schemas.elite-markets.net/eddn/shipyard/1",
|
||||||
|
"http://schemas.elite-markets.net/eddn/shipyard/1/test",
|
||||||
]
|
]
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user