Suggestion for proposal #20

This commit is contained in:
Jonathan Harris 2015-06-15 18:24:45 +01:00
parent c97c5876f2
commit bd7c708bb2

View File

@ -42,29 +42,79 @@
}, },
"modules": { "modules": {
"type" : "array", "type" : "array",
"minItems" : 1, "uniqueItems" : true,
"items" : { "items" : {
"oneOf": [ "oneOf": [
{ {
"type" : "object", "type" : "object",
"additionalProperties" : false,
"required" : [ "name" ],
"properties" : { "properties" : {
"name": { "category" : { "enum": [ "hardpoint" ] },
"type" : "string", "name" : { "type": "string", "minLength": 1 },
"minLength" : 1 "mount" : { "$ref": "#/definitions/mount" },
"guidance" : { "$ref": "#/definitions/guidance" },
"class" : { "$ref": "#/definitions/class" },
"rating" : { "$ref": "#/definitions/rating" }
}, },
"fdId": { "required" : [ "category", "name", "class", "rating" ],
"type" : "number", "additionalProperties" : false
"multipleOf" : 1.0, },
"minimum": 1 {
} "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" ]
},
"mount": {
"enum": [ "Fixed", "Gimballed", "Turreted" ],
"description": "Thermic and Kinetic weapon mounting mode"
},
"guidance": {
"enum": [ "Dumbfire", "Seeker" ],
"description": "Missile and Torpedo weapon guidance mode"
}
} }
} }