-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
template.json
1553 lines (1553 loc) · 60.6 KB
/
template.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
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/template.json",
"definitions": {
"datatype": {
"description": "Indicates limitations on the valid values a symbol may be assigned. When specified, the symbol value is attempted to be converted to this type. The datatype \"choice\" is supported only for parameter symbols and requires providing symbols.choices configuration for the symbol.",
"anyOf": [
{
"enum": ["choice", "bool", "float", "int", "hex", "text"]
},
{
"pattern": "^(integer|string)$"
}
]
},
"generatorConstant": {
"properties": {
"generator": {
"enum": ["constant"]
},
"parameters": {
"properties": {
"value": {
"description": "The constant value to be assigned to the symbol.",
"type": "string"
}
}
}
}
},
"generatorGuid": {
"properties": {
"generator": {
"enum": ["guid"]
},
"parameters": {
"properties": {
"format": {
"deprecated": true,
"deprecationMessage": "This property is not maintained and may be removed in the future. Use defaultFormat instead, or use 'guids' section.",
"description": "This property is not maintained and may be removed in the future. Use defaultFormat instead, or use 'guids' section.",
"type": "string"
},
"defaultFormat": {
"description": "The format of guid to be generated. Accepts a single value from ('n', 'd', 'b', 'p', 'x') for lowercase output or ('N', 'D', 'B', 'P', 'X') for uppercase output. The formats are defined in Guid.ToString() method documentation.",
"type": "string"
}
}
}
}
},
"generatorNow": {
"properties": {
"generator": {
"enum": ["now"]
},
"parameters": {
"properties": {
"format": {
"description": "The format string to use when converting the date-time to a string representation.",
"type": "string"
},
"utc": {
"description": "If true, use UTC time. If false, use local time.",
"type": "boolean"
}
}
}
}
},
"generatorRandom": {
"properties": {
"generator": {
"enum": ["random"]
},
"parameters": {
"required": ["low"],
"properties": {
"low": {
"description": "An integer value indicating the low-end of the range to generate the random number in.",
"type": "integer"
},
"high": {
"description": "An integer value indicating the high-end of the range to generate the random number in. If not explicitly provided, defaults to int.MaxValue.",
"type": "integer"
}
}
}
}
},
"generatorRegex": {
"properties": {
"generator": {
"enum": ["regex"]
},
"parameters": {
"properties": {
"source": {
"description": "The name of a different parameter in the template configuration. A copy of its value will be used by this generator's regex to generate the value for this parameter. The value of the source parameter is not modified.",
"type": "string"
},
"steps": {
"description": "An ordered list of key-value pairs indicating the regex replacement actions. Each element of the list must contain exactly the keys 'regex' and 'replacement' - along with their values. These replacements will be applied to the result of the previous replacement (except the first, which acts on the original value from the source).",
"type": "array",
"items": {
"required": ["regex", "replacement"],
"properties": {
"regex": {
"description": "The regular expression to use to locate the sequence to replace.",
"type": "string"
},
"replacement": {
"description": "The replacement for any sequences matched by the supplied regular expression.",
"type": "string"
}
}
}
}
}
}
}
},
"generatorRegexMatch": {
"properties": {
"generator": {
"enum": ["regexMatch"]
},
"datatype": {
"enum": ["bool"]
},
"parameters": {
"properties": {
"source": {
"description": "The symbol to search for a match. Its value will be used by this generator's regex to evaluate if there is a match. The value of the source parameter is not modified.",
"type": "string"
},
"pattern": {
"description": "The regular expression to use to match.",
"type": "string"
}
}
}
}
},
"generatorCoalesce": {
"properties": {
"generator": {
"enum": ["coalesce"]
},
"parameters": {
"type": "object",
"required": ["sourceVariableName", "fallbackVariableName"],
"properties": {
"sourceVariableName": {
"type": "string",
"description": "The name of the symbol whose value will be inspected - if the value is effectively equal to the default value, the value of the symbol referred to by fallbackVariableName is used, otherwise the value of this symbol."
},
"defaultValue": {
"type": "string",
"description": "The value to consider as being the default - if the value of the symbol referred to by sourceVariableName is equal to this, the value of the symbol referred to in fallbackVariableName is used instead.",
"default": ""
},
"fallbackVariableName": {
"type": "string",
"description": "The name of the symbol to return the value of if the symbol referred to by sourceVariableName has a value equal to the value of defaultValue."
}
}
}
}
},
"generatorCasing": {
"properties": {
"generator": {
"enum": ["casing"]
},
"parameters": {
"required": ["source"],
"properties": {
"source": {
"description": "The name of the symbol whose value should have its case changed.",
"type": "string"
},
"toLower": {
"description": "Whether the case changed to should be lower case, if false, the value is made to be uppercase instead.",
"type": "boolean",
"default": true
}
}
}
}
},
"generatorPort": {
"properties": {
"generator": {
"enum": ["port"]
},
"parameters": {
"properties": {
"low": {
"description": "The lower bound of acceptable port numbers.",
"type": "integer",
"default": 1024
},
"high": {
"description": "The upper bound of acceptable port numbers.",
"type": "integer",
"default": 65535
},
"fallback": {
"description": "The port number to use if no free ports could be found.",
"type": "integer",
"default": 0
}
}
}
}
},
"generatorSwitch": {
"properties": {
"generator": {
"enum": ["switch"]
},
"parameters": {
"properties": {
"evaluator": {
"description": "The style of evaluator to use.",
"enum": ["C++", "C++2", "MSBUILD", "VB"],
"default": "C++"
},
"datatype": {
"$ref": "#/definitions/datatype"
},
"cases": {
"description": "The set of cases to test for. The first one, in document order, to return true's value is used, if none return true, empty string is returned.",
"type": "array",
"items": {
"type": "object",
"required": ["condition", "value"],
"properties": {
"condition": {
"description": "An expression to be interpreted by the specified evaluator type.",
"type": "string"
},
"value": {
"description": "The value to return if the condition evaluates to true.",
"type": "string"
}
}
}
}
}
}
}
},
"generatorJoin": {
"properties": {
"generator": {
"enum": ["join"]
},
"parameters": {
"properties": {
"separator": {
"description": "The value used as the separator between the values to be concatenated, notice that you can use \"/\" as folder separator also on Windows since File API will convert it into \"\\\".",
"default": "",
"type": "string"
},
"removeEmptyValues": {
"description": "Indication whether null and empty strings should be removed from joining to prevent repetitive separators.",
"default": "false",
"type": "boolean"
},
"symbols": {
"description": "All values to concatenate.",
"type": "array",
"items": {
"type": "object",
"required": ["value"],
"properties": {
"type": {
"description": "\"ref\" to reference value from another symbol or \"const\" for string constant, defaults to \"const\".",
"enum": ["ref", "const"]
},
"value": {
"description": "Either name of another symbol or string constant.",
"type": "string"
}
}
}
}
}
}
}
},
"guid": {
"pattern": "^\\{?[0-9A-Fa-f]{8}[-]?([0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}\\}?$",
"description": "A guid string to be replaced in source files. Format and casing is not significant in the config as format and casing is preserved based on the particular guid in processed file(s).",
"type": "string"
},
"ice": {
"anyOf": [
{
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"modifier": {
"type": "object",
"properties": {
"condition": {
"description": "Boolean condition to indicate if the sources configuration should be included or ignored. If the condition evaluates to true or is not provided, the sources config will be used for creating the template. If it evaluates to false, the sources config will be ignored.",
"type": "string"
},
"exclude": {
"description": "The set of globbing patterns indicating the content that was included by sources.include that should not be processed.",
"allOf": [
{
"$ref": "#/definitions/ice"
}
],
"default": [
"**/[Bb]in/**",
"**/[Oo]bj/**",
".template.config/**/*",
"**/*.filelist",
"**/*.user",
"**/*.lock.json"
]
},
"include": {
"description": "The set of globbing patterns indicating the content to process in the path referred to by the source.",
"allOf": [
{
"$ref": "#/definitions/ice"
}
],
"default": ["**/*"]
},
"copyOnly": {
"description": "The set of globbing patterns indicating the content that was included by sources.include, that hasn't been excluded by sources.exclude that should be placed in the user's directory without modification.",
"allOf": [
{
"$ref": "#/definitions/ice"
}
],
"default": ["**/node_modules/**/*"]
},
"rename": {
"description": "The set of explicit renames to perform. Each key is a path to a file in the source, each value is a path to the target location.",
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"source": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/modifier"
}
],
"properties": {
"modifiers": {
"description": "A list of additional source information which gets added to the top-level source information, based on evaluation the corresponding source.modifiers.condition.",
"type": "array",
"items": {
"$ref": "#/definitions/modifier"
}
},
"source": {
"description": "The path in the template content (relative to the directory containing the .template.config folder) that should be processed.",
"type": "string",
"default": "./"
},
"target": {
"description": "The path (relative to the directory the user has specified) that content should be written to.",
"type": "string",
"default": "./"
}
}
}
},
"properties": {
"author": {
"description": "The author of the template.",
"type": "string"
},
"classifications": {
"description": "Zero or more characteristics of the template that a user might search for it by.",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"defaultName": {
"description": "The name to use during creation if no name has been specified by the user or provided from the host.",
"type": "string",
"minLength": 1
},
"generatorVersions": {
"description": "The semantic version range of the Microsoft.TemplateEngine.Orchestrator.RunnableProjects package that this template is usable with. In older versions of the engine, the four octet version string is used but is matched against a constant which was never changed from 1.0.0.0 - either syntax is now accepted, however the four octet string will not be changed from 1.0.0.0.",
"type": "string",
"default": "[1.0.0.0-*)"
},
"groupIdentity": {
"description": "The ID of the group this template belongs to. When combined with the \"tags\" section, this allows multiple templates to be displayed as one, with the the decision for which one to use being presented as a choice in each one of the pivot categories (keys).",
"type": "string",
"minLength": 1
},
"guids": {
"description": "A list of guids which appear in the template source and should be replaced in the template output. For each guid listed, a replacement guid is generated, and replaces all occurrences of the source guid in the output.",
"type": "array",
"uniqueItems": true,
"items": {
"$ref": "#/definitions/guid"
}
},
"identity": {
"description": "A unique name for this template.",
"type": "string",
"minLength": 1
},
"name": {
"description": "The name for the template that users should see.",
"type": "string",
"minLength": 1
},
"placeholderFilename": {
"description": "A filename that will be completely ignored except to indicate that its containing directory should be copied. This allows creation of an empty directory in the created template, by having a corresponding source directory containing just the placeholder file. Completely empty directories are ignored.",
"type": "string",
"default": "-.-"
},
"postActions": {
"description": "Defines an ordered list of actions to perform after template generation. The post action information is provided to the creation broker, to act on as appropriate.",
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"required": ["actionId", "manualInstructions"],
"properties": {
"actionId": {
"description": "A guid uniquely defining the action. The value must correspond to a post-action known by the broker.",
"allOf": [
{
"$ref": "#/definitions/guid"
}
]
},
"args": {
"description": "A list of key-value pairs to use when performing the action. The specific parameters required / allowed are defined by the action itself.",
"type": "object"
},
"condition": {
"description": "A C++ style expression that, if it evaluates to 'false' causes the post-action to be skipped. This expression may refer to any symbols that have been defined.",
"type": "string"
},
"continueOnError": {
"description": "If this action fails, the value of continueOnError indicates whether to attempt the next action, or stop processing the post actions. Should be set to true when subsequent actions rely on the success of the current action.",
"type": "boolean",
"default": false
},
"description": {
"description": "A human-readable description of the action.",
"type": "string"
},
"id": {
"description": "Defines identifier to be used when localizing the post action artifacts.",
"type": "string"
},
"applyFileRenamesToArgs": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of arguments names from 'args' to which the file renames configured in symbols should be applied."
},
"applyFileRenamesToManualInstructions": {
"description": "If set to true, the file renames configured in symbols should be applied to manual instructions.",
"type": "boolean",
"default": false
},
"manualInstructions": {
"description": "An ordered list of possible instructions to display if the action cannot be performed. Each element in the list must contain a key named \"text\", whose value contains the instructions. Each element may also optionally provide a key named \"condition\" - a Boolean evaluate-able string. The first instruction whose condition is false or blank will be considered valid, all others are ignored.",
"type": "array",
"items": {
"type": "object",
"required": ["text"],
"properties": {
"condition": {
"type": "string"
},
"text": {
"type": "string"
},
"id": {
"description": "Defines identifier to be used when localizing the manual instructions.",
"type": "string"
}
}
}
}
}
},
{
"oneOf": [
{
"not": {
"required": ["actionId"],
"properties": {
"actionId": {
"enum": [
"AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C",
"3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
"B17581D1-C5C9-4489-8F0A-004BE667B814",
"cb9a6cf3-4f5c-4860-b9d2-03a574959774",
"210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"D396686C-DE0E-4DE6-906D-291CD29FC5DE",
"84C0DA21-51C8-4541-9940-6CA19AF04EE6"
]
}
}
}
},
{
"description": "Instruction display - shows a message given by description and manualInstructions as well as an optional command line to ask the user to execute.",
"properties": {
"actionId": {
"enum": ["AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C"]
},
"args": {
"properties": {
"executable": {
"description": "The executable to instruct the user to run.",
"type": "string"
},
"args": {
"description": "The arguments to instruct the user to run the executable with - if executable is not specified, this value is unused.",
"type": "string"
}
}
}
}
},
{
"description": "Process start - starts a process.",
"properties": {
"actionId": {
"enum": ["3A7C4B45-1F5D-4A30-959A-51B88E82B5D2"]
},
"args": {
"required": ["executable"],
"properties": {
"redirectStandardOutput": {
"description": "Whether or not to redirect stdout for the process (prevents output from being displayed if true).",
"type": "boolean",
"default": true
},
"redirectStandardError": {
"description": "Defines whether or not the stderr should be redirected. If the output is redirected, it prevents it from being displayed.",
"type": "boolean",
"default": true
},
"executable": {
"description": "The executable to run.",
"type": "string"
},
"args": {
"description": "The arguments to supply to the executable.",
"type": "string"
}
}
}
}
},
{
"description": "Add reference - adds a reference to a project, package or framework assembly.",
"properties": {
"actionId": {
"enum": ["B17581D1-C5C9-4489-8F0A-004BE667B814"]
},
"args": {
"required": ["referenceType", "reference"],
"properties": {
"referenceType": {
"description": "The type of reference to add. project = A project to project reference. package = A NuGet package reference. framework - A framework assembly reference.",
"type": "string",
"enum": ["project", "package", "framework"],
"default": "false"
},
"projectFileExtensions": {
"description": "Must be a literal extension for the project file(s) of interest, may be a semicolon delimited list. If unspecified, any project file (*.*proj) is allowed.",
"type": "string"
},
"reference": {
"description": "The reference to be added (if referenceType=package, this is the package ID; if referenceType=framework, this is the path or assembly name; if referenceType=project, this is the path to the project reference to add).",
"type": "string"
},
"version": {
"description": "The version of the package reference to add, applicable only if referenceType=package.",
"type": "string"
},
"targetFiles": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"uniqueItems": true
},
"description": "An array of files that should be processed. If not specified, the project file in output directory or its closest parent directory will be used."
},
{
"type": "string",
"description": "A semicolon delimited list of files that should be processed. If not specified, the project file in output directory or its closest parent directory will be used."
}
]
}
}
}
}
},
{
"description": "chmod - runs chmod on a particular file.",
"properties": {
"actionId": {
"enum": ["cb9a6cf3-4f5c-4860-b9d2-03a574959774"]
},
"args": {
"type": "object",
"description": "The permissions to set: the key-value pairs, where the key is a permission, and the value is a file or array of files to apply the permission to.",
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"uniqueItems": true
},
"description": "The set of files (or patterns) to apply the permission specified in the property name to."
},
{
"type": "string",
"description": "The file (or pattern) to apply the permission specified in the property name to."
}
]
}
}
}
},
{
"description": "NuGet package restore - restores NuGet packages for all primary outputs with file extensions *.proj or *.sln.",
"properties": {
"actionId": {
"enum": ["210D431B-A78B-4D2F-B762-4ED3E3EA9025"]
},
"args": {
"properties": {
"files": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"uniqueItems": true
},
"description": "An array of files that should be restored. If not specified, all primary outputs are restored."
},
{
"type": "string",
"description": "A semicolon delimited list of files that should be restored. If not specified, all primary outputs are restored."
}
]
}
}
}
}
},
{
"description": "Add to solution - Adds one or more of the primary outputs to the first sln file found (searches up the directory tree from the output folder).",
"properties": {
"actionId": {
"enum": ["D396686C-DE0E-4DE6-906D-291CD29FC5DE"]
},
"args": {
"properties": {
"primaryOutputIndexes": {
"type": "string",
"description": "A semicolon delimited list of indexes of the primary outputs that should be added to the solution, if not specified, all primary outputs are used."
},
"solutionFolder": {
"type": "string",
"description": "The destination solution folder path to add the projects to. Can't be used with 'inRoot'. Optional."
},
"inRoot": {
"type": "boolean",
"description": "Places the projects in the root of the solution, rather than creating a solution folder. Cannot be used with 'solutionFolder'. Optional. Available since .NET SDK 7.0.200."
},
"projectFiles": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"uniqueItems": true
},
"description": "An array of project files that should be added to solution. If not specified, primary outputs will be used instead."
},
{
"type": "string",
"description": "A semicolon delimited list of files that should be added to solution. If not specified, primary outputs will be used instead."
}
]
}
}
}
}
},
{
"description": "Open in editor - Adds one or more of the primary outputs to the first sln file found (searches up the directory tree from the output folder).",
"properties": {
"actionId": {
"enum": ["84C0DA21-51C8-4541-9940-6CA19AF04EE6"]
},
"args": {
"properties": {
"files": {
"type": "string",
"description": "A semicolon delimited list of indexes of the primary outputs that should be opened in the editor."
}
}
}
}
}
]
}
]
}
},
"precedence": {
"description": "A value used to determine how preferred this template is among the other templates with the same groupIdentity (higher values are more preferred).",
"type": ["integer", "string"],
"pattern": "^([0-9]+)$",
"default": 0
},
"preferDefaultName": {
"description": "Indicated which behaviour to use when no `--name` is specified during template creation. If `true` it will use the template's `defaultName`. If no `defaultName` is found, or `preferDefaultName` is `false` it uses the fallback (output folder).",
"type": ["boolean"]
},
"preferNameDirectory": {
"description": "Indicates whether to create a directory for the template if name is specified but an output directory is not set (instead of creating the content directly in the current directory).",
"type": "boolean"
},
"primaryOutputs": {
"description": "A list of important output paths created during template generation. These paths need to be added to the newly created project at the end of template creation.",
"type": "array",
"items": {
"type": "object",
"required": ["path"],
"properties": {
"path": {
"description": "The path to the file in the template content whose corresponding output file should be included as a primary output.",
"type": "string"
},
"condition": {
"description": "The condition for including the specified path in the primary outputs set.",
"type": "string",
"default": "true"
}
}
}
},
"shortName": {
"oneOf": [
{
"description": "A shorthand name for selecting the template in CLI environment. The template short name should be unique across all the installed templates.",
"type": "string"
},
{
"type": "array",
"description": "A shorthand name for selecting the template in CLI environment. The first element is a primary choice, and will be used in scenarios which allow only single value for the short name. The template short name should be unique across all the installed templates.",
"items": {
"type": "string"
}
}
],
"minLength": 1
},
"sourceName": {
"description": "The text in the source content to replace with the name the user specifies. The value of the 'sourceName' is available in built-in 'name' symbol that can be used as the source for creating other symbols and condition expressions. See important information about how to select correct 'sourceName' in https://github.com/dotnet/templating/wiki/Naming-and-default-value-forms.",
"type": "string"
},
"sources": {
"description": "The set of mappings in the template content to user directories.",
"type": "array",
"items": {
"$ref": "#/definitions/source"
},
"default": {
"source": "./",
"target": "./"
}
},
"forms": {
"type": "object",
"description": "Custom value forms used by the template.",
"additionalProperties": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "The identifier for the value form component that will be used to transform the value."
}
},
"oneOf": [
{
"not": {
"required": ["identifier"],
"properties": {
"identifier": {
"enum": [
"lowerCaseInvariant",
"xmlEncode",
"safe_name",
"lower_safe_name",
"upperCaseInvariant",
"replace",
"safe_namespace",
"lower_safe_namespace",
"chain",
"lowerCase",
"identity",
"upperCase",
"jsonEncode",
"firstLowerCase",
"firstLowerCaseInvariant",
"firstUpperCase",
"firstUpperCaseInvariant",
"titleCase",
"kebabCase",
"snakeCase"
]
}
}
}
},
{
"description": "Lowercases the source value in a culture invariant way.",
"properties": {
"identifier": {
"enum": ["lowerCaseInvariant"]
}
}
},
{
"description": "XML encodes the source value.",
"properties": {
"identifier": {
"enum": ["xmlEncode"]
}
}
},
{
"description": "Converts the source value to a string suitable for a C# identifier.",
"properties": {
"identifier": {
"enum": ["safe_name"]
}
}
},
{
"description": "Converts the source value to a lowercase string suitable for a C# identifier.",
"properties": {
"identifier": {
"enum": ["lower_safe_name"]
}
}
},
{
"required": ["pattern", "replacement"],
"description": "Performs a regular expression replacement on the source value.",
"properties": {
"identifier": {
"enum": ["replace"]
},
"pattern": {
"description": "A regular expression whose matches will be replaced with the literal value specified in replacement.",
"type": "string"
},
"replacement": {
"description": "The value to replace the matches of the specified pattern in the source value with.",
"type": "string"
}
}
},
{
"description": "Converts the source value to a string suitable for a C# namespace.",
"properties": {
"identifier": {
"enum": ["safe_namespace"]
}
}
},
{
"description": "Converts the source value to a lowercase string suitable for a C# namespace.",
"properties": {
"identifier": {
"enum": ["lower_safe_namespace"]
}
}
},
{
"required": ["steps"],
"description": "Performs a series of transforms.",
"properties": {
"identifier": {
"enum": ["chain"]
},
"steps": {
"type": "array",
"items": {
"type": "string",
"description": "The name of the form to apply to the previous step (or source value if this is the first step)."
}
}
}
},
{
"description": "Changes the case of source value to lower-case.",
"properties": {
"identifier": {
"enum": ["lowerCase"]
}
}
},
{
"description": "Returns the source value.",
"properties": {
"identifier": {
"enum": ["identity"]
}
}
},
{
"description": "Converts the source value to upper-case using the casing rules of the current culture.",
"properties": {
"identifier": {
"enum": ["upperCase"]
}
}
},
{
"description": "Converts the source value to upper-case using the casing rules of the invariant culture.",
"properties": {
"identifier": {
"enum": ["upperCaseInvariant"]
}
}
},
{
"description": "JSON encodes the source value.",
"properties": {
"identifier": {
"enum": ["jsonEncode"]
}
}
},
{
"description": "Converts the first letter of the value to lowercase using the casing rules of the current culture.",
"properties": {
"identifier": {
"enum": ["firstLowerCase"]
}
}
},
{
"description": "Converts the first letter of the value to lowercase using the casing rules of the invariant culture.",
"properties": {
"identifier": {
"enum": ["firstLowerCaseInvariant"]
}
}
},
{
"description": "Converts the first letter of the value to uppercase using the casing rules of the current culture.",
"properties": {
"identifier": {
"enum": ["firstUpperCase"]
}
}
},