forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcpkg.schema.json
313 lines (313 loc) · 8.48 KB
/
vcpkg.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"title": "Vcpkg manifest",
"description": "Vcpkg manifest file. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md.",
"definitions": {
"identifier": {
"description": "Identifiers used for feature names.",
"allOf": [
{
"description": "Identifier are lowercase with digits and dashes.",
"type": "string",
"pattern": "[a-z0-9]+(-[a-z0-9]+)*"
},
{
"not": {
"description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.",
"type": "string",
"pattern": "^(prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default)$"
}
}
]
},
"version-text": {
"type": "string",
"pattern": "[^#]+"
},
"has-schemed-version": {
"type": "object",
"oneOf": [
{
"properties": {
"version-string": {
"description": "Text used to identify an arbitrary version",
"type": "string",
"pattern": "^[^#]+$"
}
},
"required": [
"version-string"
]
},
{
"properties": {
"version": {
"description": "A relaxed version string (1.2.3.4...)",
"type": "string",
"pattern": "^\\d+(\\.\\d+)*$"
}
},
"required": [
"version"
]
},
{
"properties": {
"version-semver": {
"description": "A semantic version string. See https://semver.org/",
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+([+-].+)?$"
}
},
"required": [
"version-semver"
]
},
{
"properties": {
"version-date": {
"description": "A date version string (e.g. 2020-01-20)",
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}(\\.\\d+)*$"
}
},
"required": [
"version-date"
]
}
]
},
"port-version": {
"description": "A non-negative integer indicating the port revision. If this field doesn't exist, it's assumed to be `0`.",
"type": "integer",
"minimum": 0,
"default": 0
},
"package-name": {
"description": "Name of a package.",
"allOf": [
{
"description": "Package name must be a dot-separated list of valid identifiers",
"type": "string",
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)*$"
},
{
"not": {
"description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.",
"type": "string",
"pattern": "(^|\\.)(prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default)(\\.|$)"
}
}
]
},
"description-field": {
"description": "A string or array of strings containing the description of a package or feature.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"dependency-object": {
"description": "Expanded form of a dependency with explicit features and platform.",
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/package-name"
},
"features": {
"type": "array",
"items": {
"$ref": "#/definitions/identifier"
}
},
"host": {
"type": "boolean",
"default": false
},
"default-features": {
"type": "boolean",
"default": true
},
"platform": {
"$ref": "#/definitions/platform-expression"
},
"version>=": {
"description": "Minimum required version",
"type": "string",
"pattern": "^[^#]+(#\\d+)?$"
}
},
"patternProperties": {
"^\\$": {}
},
"required": [
"name"
],
"additionalProperties": false
},
"dependency": {
"description": "A dependency fetchable by Vcpkg.",
"oneOf": [
{
"$ref": "#/definitions/package-name"
},
{
"$ref": "#/definitions/dependency-object"
}
]
},
"override": {
"description": "A version override.",
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/identifier"
},
"version": {
"$ref": "#/definitions/version-text"
},
"port-version": {
"$ref": "#/definitions/port-version"
}
},
"patternProperties": {
"^\\$": {}
},
"required": [
"name",
"version"
]
},
"platform-expression": {
"description": "A specification of a set of platforms. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md#definitions.",
"type": "string"
},
"feature": {
"description": "A package feature that can be activated by consumers.",
"type": "object",
"properties": {
"description": {
"$ref": "#/definitions/description-field"
},
"dependencies": {
"description": "Dependencies used by this feature.",
"type": "array",
"items": {
"$ref": "#/definitions/dependency"
}
}
},
"patternProperties": {
"^\\$": {}
},
"required": [
"description"
],
"additionalProperties": false
}
},
"type": "object",
"allOf": [
{
"properties": {
"name": {
"description": "The name of the top-level package",
"$ref": "#/definitions/package-name"
},
"version-string": {},
"version": {},
"version-date": {},
"version-semver": {},
"port-version": {
"$ref": "#/definitions/port-version"
},
"maintainers": {
"description": "An array of strings which contain the authors of a package",
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"$ref": "#/definitions/description-field"
},
"homepage": {
"description": "A url which points to the homepage of a package.",
"type": "string",
"format": "uri"
},
"documentation": {
"description": "A url which points to the documentation of a package.",
"type": "string",
"format": "uri"
},
"license": {
"description": "An SPDX license expression at version 3.9.",
"type": "string"
},
"builtin-baseline": {
"description": "A vcpkg repository commit for version control.",
"type": "string"
},
"dependencies": {
"description": "Dependencies that are always required.",
"type": "array",
"items": {
"$ref": "#/definitions/dependency"
}
},
"overrides": {
"description": "Version overrides for dependencies.",
"type": "array",
"items": {
"$ref": "#/definitions/override"
}
},
"dev-dependencies": {
"description": "Dependencies only required for developers (testing and the like).",
"type": "array",
"items": {
"$ref": "#/definitions/dependency"
}
},
"features": {
"description": "A map of features supported by the package",
"type": "object",
"patternProperties": {
"": {
"$ref": "#/definitions/feature"
}
}
},
"default-features": {
"description": "Features enabled by default with the package.",
"type": "array",
"items": {
"$ref": "#/definitions/identifier"
}
},
"supports": {
"$ref": "#/definitions/platform-expression"
}
},
"patternProperties": {
"^\\$": {}
},
"required": [
"name"
],
"additionalProperties": false
},
{
"$ref": "#/definitions/has-schemed-version"
}
]
}