forked from elistevens/xws-spec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.json
79 lines (79 loc) · 2.97 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "X-Wing Squadron Format Schema",
"description": "A squadron for the X-Wing Miniatures Game in app-independent format for sharing, saving and moving between apps.",
"type": "object",
"required": ["version","faction","pilots"],
"additionalProperties" : false,
"properties": {
"version": {
"type": "string",
"pattern" : "^[0-9]+\.[0-9]+\.[0-9]+$",
"description": "The version of the XWS spec used to create this data"
},
"name": {
"type": "string",
"description": "The name of the squadron."
},
"points": {
"type": "integer",
"description": "The total points spent creating this squadron."
},
"faction": {
"type": "string",
"enum": [ "rebels", "empire", "scum" ],
"description": "The faction this squadron belongs to."
},
"description": {
"type": "string",
"description": "A description of this squadron."
},
"pilots": {
"type": "array",
"description": "The members of this squadron.",
"items": {
"type": "object",
"minItems": 1,
"required": ["name","ship"],
"additionalProperties" : false,
"properties": {
"name": {
"type": "string",
"pattern" : "^[0-9a-z]+$"
},
"ship": {
"type": "string",
"pattern" : "^[0-9a-z]+$"
},
"upgrades": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"patternProperties": {
"^[0-9a-z]+$": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern" : "^[0-9a-z]+$"
}
}
}
},
"vendor": {
"type": "object",
"minProperties": 1,
"maxProperties": 1,
"description": "An extensible object containing app-specific data. Developers should put extra data here under their own namespace."
}
}
}
},
"vendor": {
"type": "object",
"minProperties": 1,
"maxProperties": 1,
"description": "An extensible object containing app-specific data. Developers should put extra data here under their own namespace."
}
}
}