Skip to content

Commit 5b007fe

Browse files
committed
schema: apply minItems: 1 to all arrays
1 parent 28953fb commit 5b007fe

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

schemas/bashly.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"title": "allowed",
5757
"description": "Valid values of the current positional argument\nhttps://bashly.dannyb.co/configuration/argument/#allowed",
5858
"type": "array",
59-
"minLength": 1,
59+
"minItems": 1,
6060
"uniqueItems": true,
6161
"items": {
6262
"description": "A valid value of the current positional argument",
@@ -193,7 +193,7 @@
193193
"title": "allowed",
194194
"description": "Valid values of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#allowed",
195195
"type": "array",
196-
"minLength": 1,
196+
"minItems": 1,
197197
"uniqueItems": true,
198198
"items": {
199199
"description": "A valid value of the current positional argument",
@@ -208,7 +208,7 @@
208208
"title": "conflicts",
209209
"description": "Mutually exclusive flags of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#conflicts",
210210
"type": "array",
211-
"minLength": 1,
211+
"minItems": 1,
212212
"uniqueItems": true,
213213
"items": {
214214
"description": "The long form of the required flag",
@@ -223,7 +223,7 @@
223223
"title": "needs",
224224
"description": "Additional flags required by the current flag\nhttps://bashly.dannyb.co/configuration/flag/#needs",
225225
"type": "array",
226-
"minLength": 1,
226+
"minItems": 1,
227227
"uniqueItems": true,
228228
"items": {
229229
"description": "The long form of the required flag",
@@ -238,7 +238,7 @@
238238
"title": "completions",
239239
"description": "Completions of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#completions",
240240
"type": "array",
241-
"minLength": 1,
241+
"minItems": 1,
242242
"uniqueItems": true,
243243
"items": {
244244
"description": "A completion of the current flag",
@@ -349,7 +349,7 @@
349349
"title": "allowed",
350350
"description": "Valid values of the current environment variable\nhttps://bashly.dannyb.co/configuration/environment-variable/#allowed",
351351
"type": "array",
352-
"minLength": 1,
352+
"minItems": 1,
353353
"uniqueItems": true,
354354
"items": {
355355
"description": "A valid value of the current environment variable",
@@ -474,8 +474,8 @@
474474
"title": "args",
475475
"description": "Arguments of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#args",
476476
"type": "array",
477-
"uniqueItems": true,
478477
"minItems": 1,
478+
"uniqueItems": true,
479479
"items": {
480480
"$ref": "#/definitions/argument"
481481
}
@@ -484,8 +484,8 @@
484484
"title": "flags",
485485
"description": "Flags of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#flags",
486486
"type": "array",
487-
"uniqueItems": true,
488487
"minItems": 1,
488+
"uniqueItems": true,
489489
"items": {
490490
"$ref": "#/definitions/flag"
491491
}
@@ -494,6 +494,7 @@
494494
"title": "commands",
495495
"description": "Subcommands of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#commands",
496496
"type": "array",
497+
"minItems": 1,
497498
"uniqueItems": true,
498499
"items": {
499500
"$ref": "#/definitions/command-property"
@@ -529,6 +530,7 @@
529530
"title": "environment variables",
530531
"description": "Environment variables of the current application\nhttps://bashly.dannyb.co/configuration/environment-variable/#environment-variable",
531532
"type": "array",
533+
"minItems": 1,
532534
"uniqueItems": true,
533535
"items": {
534536
"$ref": "#/definitions/environment-variable"
@@ -538,6 +540,7 @@
538540
"title": "variables",
539541
"description": "Bash variables for the current application\nhttps://bashly.dannyb.co/configuration/command/#variables",
540542
"type": "array",
543+
"minItems": 1,
541544
"uniqueItems": true,
542545
"items": {
543546
"$ref": "#/definitions/variable"
@@ -636,7 +639,7 @@
636639
"title": "completions",
637640
"description": "Completions of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#completions",
638641
"type": "array",
639-
"minLength": 1,
642+
"minItems": 1,
640643
"uniqueItems": true,
641644
"items": {
642645
"description": "A completion of the current script or sub-command",
@@ -700,7 +703,7 @@
700703
{
701704
"description": "Dependencies of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/dependency/#dependency",
702705
"type": "array",
703-
"minLength": 1,
706+
"minItems": 1,
704707
"uniqueItems": true,
705708
"items": {
706709
"description": "A dependency of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/dependency/#dependency",

support/schema/bashly.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ definitions:
5353
Valid values of the current positional argument
5454
https://bashly.dannyb.co/configuration/argument/#allowed
5555
type: array
56-
minLength: 1
56+
minItems: 1
5757
uniqueItems: true
5858
items:
5959
description: A valid value of the current positional argument
@@ -172,7 +172,7 @@ definitions:
172172
Valid values of the current flag
173173
https://bashly.dannyb.co/configuration/flag/#allowed
174174
type: array
175-
minLength: 1
175+
minItems: 1
176176
uniqueItems: true
177177
items:
178178
description: A valid value of the current positional argument
@@ -186,7 +186,7 @@ definitions:
186186
Mutually exclusive flags of the current flag
187187
https://bashly.dannyb.co/configuration/flag/#conflicts
188188
type: array
189-
minLength: 1
189+
minItems: 1
190190
uniqueItems: true
191191
items:
192192
description: The long form of the required flag
@@ -200,7 +200,7 @@ definitions:
200200
Additional flags required by the current flag
201201
https://bashly.dannyb.co/configuration/flag/#needs
202202
type: array
203-
minLength: 1
203+
minItems: 1
204204
uniqueItems: true
205205
items:
206206
description: The long form of the required flag
@@ -214,7 +214,7 @@ definitions:
214214
Completions of the current flag
215215
https://bashly.dannyb.co/configuration/flag/#completions
216216
type: array
217-
minLength: 1
217+
minItems: 1
218218
uniqueItems: true
219219
items:
220220
description: A completion of the current flag
@@ -317,7 +317,7 @@ definitions:
317317
Valid values of the current environment variable
318318
https://bashly.dannyb.co/configuration/environment-variable/#allowed
319319
type: array
320-
minLength: 1
320+
minItems: 1
321321
uniqueItems: true
322322
items:
323323
description: A valid value of the current environment variable
@@ -407,8 +407,8 @@ definitions:
407407
Arguments of the current script or sub-command
408408
https://bashly.dannyb.co/configuration/command/#args
409409
type: array
410-
uniqueItems: true
411410
minItems: 1
411+
uniqueItems: true
412412
items:
413413
$ref: '#/definitions/argument'
414414
flags-property:
@@ -417,8 +417,8 @@ definitions:
417417
Flags of the current script or sub-command
418418
https://bashly.dannyb.co/configuration/command/#flags
419419
type: array
420-
uniqueItems: true
421420
minItems: 1
421+
uniqueItems: true
422422
items:
423423
$ref: '#/definitions/flag'
424424
commands-property:
@@ -427,6 +427,7 @@ definitions:
427427
Subcommands of the current script or sub-command
428428
https://bashly.dannyb.co/configuration/command/#commands
429429
type: array
430+
minItems: 1
430431
uniqueItems: true
431432
items:
432433
$ref: '#/definitions/command-property'
@@ -457,6 +458,7 @@ definitions:
457458
Environment variables of the current application
458459
https://bashly.dannyb.co/configuration/environment-variable/#environment-variable
459460
type: array
461+
minItems: 1
460462
uniqueItems: true
461463
items:
462464
$ref: '#/definitions/environment-variable'
@@ -466,6 +468,7 @@ definitions:
466468
Bash variables for the current application
467469
https://bashly.dannyb.co/configuration/command/#variables
468470
type: array
471+
minItems: 1
469472
uniqueItems: true
470473
items:
471474
$ref: '#/definitions/variable'
@@ -554,7 +557,7 @@ definitions:
554557
Completions of the current script or sub-command
555558
https://bashly.dannyb.co/configuration/command/#completions
556559
type: array
557-
minLength: 1
560+
minItems: 1
558561
uniqueItems: true
559562
items:
560563
description: A completion of the current script or sub-command
@@ -617,7 +620,7 @@ definitions:
617620
Dependencies of the current script or sub-command
618621
https://bashly.dannyb.co/configuration/dependency/#dependency
619622
type: array
620-
minLength: 1
623+
minItems: 1
621624
uniqueItems: true
622625
items:
623626
description: |-

0 commit comments

Comments
 (0)