Skip to content

Commit 3e68b5e

Browse files
authored
Merge pull request #20 from ioncakephper:chore/gmd-no-variadic-option
feat(schema)!: Remove `variadic` property from CLI options definition
2 parents 6b69839 + 7f71cf1 commit 3e68b5e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ While the examples show a simple command, the schema is designed to handle enter
119119

120120
## Schema Reference
121121

122-
All CLI definitions must be nested under a top-level `cli` object. This root object is mandatory and serves as the container for all commands, arguments, and options that define your command-line interface. While other properties can exist alongside the `cli` object, they will not be validated by the schema.
122+
> [!IMPORTANT]
123+
> All CLI definitions must be nested under a top-level `cli` object. This root object is mandatory and serves as the container for all commands, arguments, and options that define your command-line interface. While other properties can exist alongside the `cli` object, they will not be validated by the schema.
123124
124125
### The `cli` Object
125126

@@ -176,11 +177,11 @@ The `cli-schema` defines the structure for your CLI definition file. Here are th
176177
| `required` | `boolean` | Whether the option is required. Defaults to `false`. |
177178
| `short` | `string` | The single-letter short alias (e.g., `p`). Must be `^[a-zA-Z]$`. |
178179
| `type` | `string` | The data type. Can be `string`, `number`, `boolean`. |
179-
| `variadic` | `boolean` | Whether the option can accept multiple values. Defaults to `false`. |
180180

181181
### The `default` Object
182182

183-
The `default` object is used to define a default value for an `argument` or `option`. It must have exactly one of the following properties:
183+
> [!IMPORTANT]
184+
> The `default` object is used to define a default value for an `argument` or `option`. It must have exactly one of the following properties:
184185
185186
| Property | Type | Description |
186187
| ------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |

schema/cli.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"short": { "type": "string", "pattern": "^[a-zA-Z]$" },
5858
"description": { "type": "string" },
5959
"type": { "enum": ["string", "number", "boolean"] },
60-
"variadic": { "type": "boolean" },
6160
"required": { "type": "boolean" },
6261
"choices": {
6362
"type": "array",

0 commit comments

Comments
 (0)