Skip to content

Commit 266d431

Browse files
Merge pull request #49 from spectreconsole/feature/GH-41
Add `recursive` property to `Option Object`
2 parents 5b90684 + 819968a commit 266d431

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

draft.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ This is the root object of the OpenCLI Description.
176176
| arguments | [[Argument](#argument-object)] | The option's arguments |
177177
| group | `string` | The option group |
178178
| description | `string` | The option description |
179+
| recursive | `bool` | Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands |
179180
| hidden | `bool` | Whether or not the option is hidden |
180181
| metadata | [[Metadata Object](#metadata-object)] | Custom metadata |
181182

schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@
193193
"type": "string",
194194
"description": "The option description"
195195
},
196+
"recursive": {
197+
"type": "boolean",
198+
"default": false,
199+
"description": "Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands"
200+
},
196201
"hidden": {
197202
"type": "boolean",
198203
"default": false,

typespec/main.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ model Option {
164164
@doc("The option description")
165165
description?: string;
166166

167+
@doc("Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands")
168+
recursive?: boolean = false;
169+
167170
@doc("Whether or not the option is hidden")
168171
hidden?: boolean = false;
169172

0 commit comments

Comments
 (0)