From 5b007fe8a006cd7c9f0c6f1980ce74f402ee272b Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Tue, 22 Oct 2024 16:29:36 +0000 Subject: [PATCH] schema: apply `minItems: 1` to all arrays --- schemas/bashly.json | 23 +++++++++++++---------- support/schema/bashly.yml | 23 +++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/schemas/bashly.json b/schemas/bashly.json index 89334c94..fc996887 100644 --- a/schemas/bashly.json +++ b/schemas/bashly.json @@ -56,7 +56,7 @@ "title": "allowed", "description": "Valid values of the current positional argument\nhttps://bashly.dannyb.co/configuration/argument/#allowed", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A valid value of the current positional argument", @@ -193,7 +193,7 @@ "title": "allowed", "description": "Valid values of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#allowed", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A valid value of the current positional argument", @@ -208,7 +208,7 @@ "title": "conflicts", "description": "Mutually exclusive flags of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#conflicts", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "The long form of the required flag", @@ -223,7 +223,7 @@ "title": "needs", "description": "Additional flags required by the current flag\nhttps://bashly.dannyb.co/configuration/flag/#needs", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "The long form of the required flag", @@ -238,7 +238,7 @@ "title": "completions", "description": "Completions of the current flag\nhttps://bashly.dannyb.co/configuration/flag/#completions", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A completion of the current flag", @@ -349,7 +349,7 @@ "title": "allowed", "description": "Valid values of the current environment variable\nhttps://bashly.dannyb.co/configuration/environment-variable/#allowed", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A valid value of the current environment variable", @@ -474,8 +474,8 @@ "title": "args", "description": "Arguments of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#args", "type": "array", - "uniqueItems": true, "minItems": 1, + "uniqueItems": true, "items": { "$ref": "#/definitions/argument" } @@ -484,8 +484,8 @@ "title": "flags", "description": "Flags of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#flags", "type": "array", - "uniqueItems": true, "minItems": 1, + "uniqueItems": true, "items": { "$ref": "#/definitions/flag" } @@ -494,6 +494,7 @@ "title": "commands", "description": "Subcommands of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#commands", "type": "array", + "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/command-property" @@ -529,6 +530,7 @@ "title": "environment variables", "description": "Environment variables of the current application\nhttps://bashly.dannyb.co/configuration/environment-variable/#environment-variable", "type": "array", + "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/environment-variable" @@ -538,6 +540,7 @@ "title": "variables", "description": "Bash variables for the current application\nhttps://bashly.dannyb.co/configuration/command/#variables", "type": "array", + "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/definitions/variable" @@ -636,7 +639,7 @@ "title": "completions", "description": "Completions of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/command/#completions", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A completion of the current script or sub-command", @@ -700,7 +703,7 @@ { "description": "Dependencies of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/dependency/#dependency", "type": "array", - "minLength": 1, + "minItems": 1, "uniqueItems": true, "items": { "description": "A dependency of the current script or sub-command\nhttps://bashly.dannyb.co/configuration/dependency/#dependency", diff --git a/support/schema/bashly.yml b/support/schema/bashly.yml index 6f6adba2..5bad1e4a 100644 --- a/support/schema/bashly.yml +++ b/support/schema/bashly.yml @@ -53,7 +53,7 @@ definitions: Valid values of the current positional argument https://bashly.dannyb.co/configuration/argument/#allowed type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: A valid value of the current positional argument @@ -172,7 +172,7 @@ definitions: Valid values of the current flag https://bashly.dannyb.co/configuration/flag/#allowed type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: A valid value of the current positional argument @@ -186,7 +186,7 @@ definitions: Mutually exclusive flags of the current flag https://bashly.dannyb.co/configuration/flag/#conflicts type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: The long form of the required flag @@ -200,7 +200,7 @@ definitions: Additional flags required by the current flag https://bashly.dannyb.co/configuration/flag/#needs type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: The long form of the required flag @@ -214,7 +214,7 @@ definitions: Completions of the current flag https://bashly.dannyb.co/configuration/flag/#completions type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: A completion of the current flag @@ -317,7 +317,7 @@ definitions: Valid values of the current environment variable https://bashly.dannyb.co/configuration/environment-variable/#allowed type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: A valid value of the current environment variable @@ -407,8 +407,8 @@ definitions: Arguments of the current script or sub-command https://bashly.dannyb.co/configuration/command/#args type: array - uniqueItems: true minItems: 1 + uniqueItems: true items: $ref: '#/definitions/argument' flags-property: @@ -417,8 +417,8 @@ definitions: Flags of the current script or sub-command https://bashly.dannyb.co/configuration/command/#flags type: array - uniqueItems: true minItems: 1 + uniqueItems: true items: $ref: '#/definitions/flag' commands-property: @@ -427,6 +427,7 @@ definitions: Subcommands of the current script or sub-command https://bashly.dannyb.co/configuration/command/#commands type: array + minItems: 1 uniqueItems: true items: $ref: '#/definitions/command-property' @@ -457,6 +458,7 @@ definitions: Environment variables of the current application https://bashly.dannyb.co/configuration/environment-variable/#environment-variable type: array + minItems: 1 uniqueItems: true items: $ref: '#/definitions/environment-variable' @@ -466,6 +468,7 @@ definitions: Bash variables for the current application https://bashly.dannyb.co/configuration/command/#variables type: array + minItems: 1 uniqueItems: true items: $ref: '#/definitions/variable' @@ -554,7 +557,7 @@ definitions: Completions of the current script or sub-command https://bashly.dannyb.co/configuration/command/#completions type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: A completion of the current script or sub-command @@ -617,7 +620,7 @@ definitions: Dependencies of the current script or sub-command https://bashly.dannyb.co/configuration/dependency/#dependency type: array - minLength: 1 + minItems: 1 uniqueItems: true items: description: |-