Skip to content

Commit

Permalink
schema: apply minItems: 1 to all arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Oct 22, 2024
1 parent 28953fb commit 5b007fe
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
23 changes: 13 additions & 10 deletions schemas/bashly.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
23 changes: 13 additions & 10 deletions support/schema/bashly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |-
Expand Down

0 comments on commit 5b007fe

Please sign in to comment.