-
Notifications
You must be signed in to change notification settings - Fork 1
/
versions.schema.json
153 lines (153 loc) · 5.41 KB
/
versions.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://github.com/Orochimarufan/Kawariki/versions.schema.json",
"title": "Distributions",
"description": "Describes different distributions/versions of an engine component",
"definitions": {
"interpolated_string": {
"description": "String interpolated with adjacent values using python {key} syntax",
"type": "string"
},
"pattern_string": {
"description": "Interpolated String that can be selected from multiple options",
"oneOf": [
{
"$ref": "#/definitions/interpolated_string"
},
{
"type":"object",
"patternProperties": {
"[^=]+!?=.+": {
"$ref": "#/definitions/pattern_string"
},
"": {
"$ref": "#/definitions/pattern_string"
}
},
"additionalProperties": false,
"minProperties": 1
}
]
},
"value": {
"description": "Value that can be selected from multiple options",
"oneOf": [
{
"$ref": "#/definitions/interpolated_string"
},
{
"type": "object",
"patternProperties": {
"[^=]+!?=.+": {
"$ref": "#/definitions/value"
},
"": {
"$ref": "#/definitions/value"
}
},
"additionalProperties": false,
"minProperties": 1
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "array",
"items": {"$ref": "#/definitions/value"}
}
]
},
"info": {
"type": "object",
"properties": {
"name": {
"description": "Human-readable name of the distribution",
"$ref": "#/definitions/interpolated_string"
},
"alias": {
"description": "Names a distribution may be referred to by for selecting it explicitly",
"type":"array",
"items": {"$ref": "#/definitions/interpolated_string"}
},
"version": {
"description": "The version number as array of integers. Trailing element may be a string",
"type": "array",
"items": {
"oneOf": [
{"type": "integer"},
{"type": "string"}
]
},
"minItems": 2
},
"platforms": {
"description": "The list of supported platform strings",
"type": "array",
"items": {"type": "string"},
"minItems": 1
},
"slug": {
"description": "A slug to use when generating filesystem paths. Also an implicit unique alias value",
"$ref": "#/definitions/pattern_string"
},
"binary": {
"description": "The binary filename relative to the extracted distribution",
"$ref": "#/definitions/pattern_string"
},
"url": {
"description": "The URL to download the distribution from",
"$ref": "#/definitions/pattern_string"
},
"strip_leading": {
"description": "Strip the leading component from the extracted files",
"oneOf": [
{"type": "boolean"},
{"type": "string"}
]
}
},
"additionalProperties": {
"$ref": "#/definitions/value"
}
}
},
"type":"object",
"properties": {
"$schema": {
"type":"string"
},
"format": {
"type": "integer",
"description": "Format version number, currently 2"
},
"name": {
"description": "Component name",
"type": "string"
},
"platforms": {
"type": "object",
"description": "Mapping Kawariki platform strings to distribution platform strings, if necessary",
"additionalProperties": {
"type": "string"
},
"minProperties": 1
},
"common": {
"description": "Properties common to all versions",
"$ref": "#/definitions/info"
},
"versions": {
"description": "The available versions of the component",
"type": "array",
"items": {
"$ref": "#/definitions/info"
},
"minItems": 1
}
},
"required": ["format", "name", "versions"],
"additionalProperties": false
}