/
buildschema.json
526 lines (526 loc) · 17.3 KB
/
buildschema.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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
{
"$id": "https://github.com/mhutch/MonoDevelop.MSBuildEditor",
"$comment": "This should be draft-07, but anything newer than draft-04 (or https) causes VS to error out when using the schema to validate other JSON files",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Describes the MSBuild schema format",
"type": "object",
"properties": {
"$schema": { "type": "string" },
"license": { "type": "string" },
"items": {
"type": "object",
"patternProperties": {
"^([A-Za-z_][A-Za-z\\d_-]*)$": { "$ref": "#/definitions/item" }
},
"additionalProperties": false
},
"properties": {
"type": "object",
"patternProperties": {
"^([A-Za-z_][A-Za-z\\d_-]*)$": { "$ref": "#/definitions/property" }
},
"additionalProperties": false
},
"targets": {
"type": "object",
"patternProperties": {
"^([A-Za-z_][A-Za-z\\d_-]*)$": { "$ref": "#/definitions/target" }
},
"additionalProperties": false
},
"intellisenseImports": {
"type": "array",
"items": { "type": "string" },
"description": "Additional schemas to be imported only when directly editing the file for which this schema is a sidecar."
},
"types": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/valueType" },
"description": "Custom type definitions"
},
"metadata": {
"type": "array",
"items": { "$ref": "#/definitions/metadataOverride" },
"description": "Apply metadata to existing item types"
}
},
"additionalProperties": false,
"definitions": {
"property": {
"description": "Defines a property",
"oneOf": [
{
"description": "Description of the property",
"type": "string"
},
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description of the property."
},
"type": { "$ref": "#/definitions/valueType" },
"defaultValue": {
"type": "string",
"description": "The default value of the property."
},
"isList": { "$ref": "#/definitions/valueIsList" },
"listSeparators": { "$ref": "#/definitions/valueListSeparators" },
"isLiteral": {
"description": "Permit only literal values (i.e. no expressions). Defaults to false.",
"type": "boolean",
"default": false
},
"deprecationMessage": { "$ref": "#/definitions/deprecationMessage" },
"versionInfo": { "$ref": "#/definitions/versionInfo" },
"helpUrl": { "$ref": "#/definitions/helpUrl" }
},
"additionalProperties": false
}
]
},
"item": {
"description": "Defines an item",
"oneOf": [
{
"description": "Description of the item",
"type": "string"
},
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description of the item."
},
"includeDescription": {
"type": "string",
"description": "Describes the item values listed in the Include attribute e.g. 'source files'."
},
"type": { "$ref": "#/definitions/valueType" },
"metadata": {
"type": "object",
"patternProperties": {
"^([A-Za-z_][A-Za-z\\d_-]*)$": { "$ref": "#/definitions/metadata" }
},
"additionalProperties": false
},
"packageType": {
"description": "Only applies to items of type `nuget-id`. Restricts the package type."
},
"isSingleton": {
"description": "Specifies that there may only be a single item of this type. This behavior is rare and unidiomatic.",
"type": "boolean",
"default": false
},
"deprecationMessage": { "$ref": "#/definitions/deprecationMessage" },
"versionInfo": { "$ref": "#/definitions/versionInfo" },
"helpUrl": { "$ref": "#/definitions/helpUrl" }
},
"additionalProperties": false
}
]
},
"metadata": {
"description": "Defines a metadata value",
"oneOf": [
{
"description": "Description of the metadata",
"type": "string"
},
{
"type": "object",
"properties": {
"description": { "type": "string" },
"includeDescription": { "type": "string" },
"type": { "$ref": "#/definitions/valueType" },
"defaultValue": {
"type": "string",
"description": "The default value of the metadata."
},
"isList": { "$ref": "#/definitions/valueIsList" },
"listSeparators": { "$ref": "#/definitions/valueListSeparators" },
"isRequired": {
"description": "Whether this metadata is required on items of this type",
"type": "boolean"
},
"deprecationMessage": { "$ref": "#/definitions/deprecationMessage" },
"versionInfo": { "$ref": "#/definitions/versionInfo" },
"helpUrl": { "$ref": "#/definitions/helpUrl" }
},
"additionalProperties": false
}
]
},
"target": {
"oneOf": [
{
"type": "string",
"description": "Description of the target"
},
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description of the target"
},
"deprecationMessage": { "$ref": "#/definitions/deprecationMessage" },
"versionInfo": { "$ref": "#/definitions/versionInfo" },
"helpUrl": { "$ref": "#/definitions/helpUrl" }
},
"additionalProperties": false
}
]
},
"metadataOverride": {
"type": "object",
"properties": {
"$appliesTo": {
"description": "Item type or array of item types to which to apply this metadata",
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"pattern": "^([A-Za-z_][A-Za-z\\d_-]*)$"
}
},
{
"type": "string",
"pattern": "^([A-Za-z_][A-Za-z\\d_-]*)$"
}
]
}
},
"patternProperties": {
"^([A-Za-z_][A-Za-z\\d_-]*)$": { "$ref": "#/definitions/metadata" }
},
"additionalProperties": false
},
"valueIsList": {
"description": "Whether the value permits lists. The default semicolon separator can be overridden with \"listSeparators\" property.",
"type": "boolean",
"default": false
},
"valueListSeparators": {
"description": "Overrides the list separator characters for this value. Defaults to \";\"",
"type": "string",
"enum": [ ";", ",", ";," ],
"default": ";"
},
"valueType": {
"description": "The type of the value",
"oneOf": [
{ "$ref": "#/definitions/valueTypeRef" },
{ "$ref": "#/definitions/valueTypeIntrinsic" },
{ "$ref": "#/definitions/valueTypeCustomMinimal" },
{ "$ref": "#/definitions/valueTypeCustom" }
]
},
"valueTypeDefinition": {
"oneOf": [
{ "$ref": "#/definitions/valueTypeCustomMinimal" },
{ "$ref": "#/definitions/valueTypeCustom" }
]
},
"valueTypeCustomMinimal": {
"type": "array",
"items": { "type": "string" }
},
"valueTypeRef": {
"type": "object",
"properties": {
"$ref": {
"description": "JSON pointer to an existing type definition",
"type": "string",
"format": "json-pointer"
}
},
"additionalProperties": false
},
"valueTypeCustom": {
"type": "object",
"properties": {
"name": {
"description": "Overrides the name displayed for this type in the UI. If not provided, falls back to the name of the `baseType`, otherwise the type is displayed as an anonymous type.",
"type": "string",
"pattern": "^([a-z][a-z\\d-]*)$"
},
"description": {
"description": "Description of the type",
"type": "string"
},
"values": {
"description": "The values this type can have",
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"description": "Description of the value"
},
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "Description of the value"
},
"deprecationMessage": { "$ref": "#/definitions/deprecationMessage" },
"versionInfo": { "$ref": "#/definitions/versionInfo" },
"helpUrl": { "$ref": "#/definitions/helpUrl" },
"aliases": {
"type": "array",
"items": { "type": "string" },
"description": "Aliases for this value. They will not be shown in completion, but validation and Find References will consider them to be equivalent."
}
},
"additionalProperties": false
}
]
}
},
"allowUnknownValues": {
"description": "Whether to allow unknown values",
"type": "boolean"
},
"baseType": {
"description": "If specified, the type's values conform to this underlying type and will inherit validation and commands that apply to that type",
"enum": [
"guid",
"int",
"warning-code"
]
},
"caseSensitive": {
"description": "Whether values should be compared in a case-sensitive way",
"type": "boolean"
},
"helpUrl": {
"description": "Documentation link to be displayed in UI.",
"type": "string"
},
"analyzerHints": {
"type": "object",
"properties": {
"GuidFormat": {
"type": "string",
"enum": [
"N",
"D",
"B",
"P"
],
"description": "Constrains a `guid`-derived type to a specific `Guid.TryParseExact` format"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
},
"valueTypeIntrinsic": {
"type": "string",
"anyOf": [
{
"const": "data",
"description": "A string containing arbitrary data"
},
{
"const": "bool",
"description": "A boolean value"
},
{
"const": "int",
"description": "An integer value"
},
{
"const": "string",
"description": "A string value"
},
{
"const": "guid",
"description": "A GUID value"
},
{
"const": "url",
"description": "A URL"
},
{
"const": "version",
"description": "A version of the form `major.minor[.build[.revision]]."
},
{
"const": "version-suffixed",
"description": "A version that may have a prerelease tag e.g. `1.0.2-beta`"
},
{
"const": "lcid",
"description": "A Windows language code identifier (LCID)"
},
{
"const": "culture",
"description": "A .NET culture name"
},
{
"const": "target-name",
"description": "An MSBuild target name"
},
{
"const": "item-name",
"description": "An MSBuild item name"
},
{
"const": "property-name",
"description": "An MSBuild property name"
},
{
"const": "sdk",
"description": "An MSBuild SDK ID without a version"
},
{
"const": "sdk-version",
"description": "An MSBuild SDK ID with a version"
},
{
"const": "label",
"description": "A GUID value"
},
{
"const": "importance",
"description": "An MSBuild message importance level"
},
{
"const": "runtime-id",
"description": "A .NET Runtime ID (RID)"
},
{
"const": "target-framework",
"description": "A .NET target framework in short form e.g. `net8.0-windows`"
},
{
"const": "target-framework-version",
"description": "A .NET target framework version e.g. `4.8`"
},
{
"const": "target-framework-identifier",
"description": "A .NET target framework identifier e.g. `.NETStandard`"
},
{
"const": "target-framework-profile",
"description": "A .NET target framework profile name e.g. `Client`"
},
{
"const": "target-framework-moniker",
"description": "A .NET target framework in long form e.g. `.NETFramework,Version=3.5,Profile=Client`"
},
{
"const": "nuget-id",
"description": "A NuGet package ID"
},
{
"const": "nuget-version",
"description": "A NuGet package version"
},
{
"const": "project-file",
"description": "The path of an MSBuild file, either absolute or relative to the project file"
},
{
"const": "file",
"description": "The path of a file, either absolute or relative to the project file"
},
{
"const": "folder",
"description": "The path of a directory, without a trailing slash, either absolute or relative to the project file"
},
{
"const": "folder-with-slash",
"description": "The path of a directory, with a trailing slash, either absolute or relative to the project file"
},
{
"const": "file-or-folder",
"description": "The path of a directory or file, either absolute or relative to the project file"
},
{
"const": "extension",
"description": "A file value"
},
{
"const": "configuration",
"description": "A value of the MSBuild `Configuration` property"
},
{
"const": "platform",
"description": "A value of the MSBuild `Platform` property"
},
{
"const": "clr-namespace",
"description": "A .NET namespace"
},
{
"const": "clr-type",
"description": "A fully qualified .NET type name"
},
{
"const": "clr-type-name",
"description": "An unqualified .NET type name"
},
{
"const": "warning-code",
"description": "A warning code from the compiler, analyzers, MSBuild, etc."
}
]
},
"deprecationMessage": {
"type": "string",
"description": "Indicates that the symbol is deprecated and explains why.",
"minLength": 1
},
"versionInfo": {
"type": "object",
"properties": {
"kind": { "$ref": "#/definitions/versionKind" },
"introduced": {
"type": "string",
"description": "The version in which this symbol was introduced. Depending on the value of `versionKind`, this version may refer to MSBuild, the .NET SDK, or a NuGet package."
},
"deprecated": {
"type": "string",
"description": "The version in which this symbol was deprecated. Only valid when `deprecationMessage` is set. Depending on the value of `versionKind`, this version may refer to MSBuild, the .NET SDK, or a NuGet package."
},
"ignored": {
"type": "boolean",
"description": "If the symbol is deprecated, indicates that it is ignored and assignments may be removed safely."
}
},
"additionalProperties": false
},
"helpUrl": {
"type": "string",
"description": "Documentation link to be displayed in UI.",
"minLength": 1,
"format": "uri"
},
"versionKind": {
"description": "Explicitly specify what the `since` and `deprecated` versions refer to. A default value is inferred e.g. schemas in the .NET SDK directory default to `DotNetSdk`, and schemas in the MSBuild `bin` directory or bundled with editor default to `MSBuild`.",
"type": "string",
"anyOf": [
{
"const": "MSBuild",
"description": "The symbol was deprecated or introduced in a specific version of MSBuild"
},
{
"const": "DotNetSdk",
"description": "The symbol was deprecated or introduced in a specific version of the .NET SDK"
},
{
"const": "NuGetPackage",
"description": "The symbol was deprecated or introduced in a specific version of a NuGet package"
}
]
}
}
}