diff --git a/draft.md b/draft.md index 2bd770b..51d5378 100644 --- a/draft.md +++ b/draft.md @@ -177,6 +177,7 @@ This is the root object of the OpenCLI Description. | arguments | [[Argument](#argument-object)] | The option's arguments | | group | `string` | The option group | | description | `string` | The option description | +| recursive | `bool` | Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands | | hidden | `bool` | Whether or not the option is hidden | | metadata | [[Metadata Object](#metadata-object)] | Custom metadata | diff --git a/schema.json b/schema.json index b948c98..06b8970 100644 --- a/schema.json +++ b/schema.json @@ -197,6 +197,11 @@ "type": "string", "description": "The option description" }, + "recursive": { + "type": "boolean", + "default": false, + "description": "Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands" + }, "hidden": { "type": "boolean", "default": false, diff --git a/typespec/main.tsp b/typespec/main.tsp index c89c346..1800925 100644 --- a/typespec/main.tsp +++ b/typespec/main.tsp @@ -167,6 +167,9 @@ model Option { @doc("The option description") description?: string; + @doc("Specifies whether the option is accessible from the immediate parent command and, recursively, from its subcommands") + recursive?: boolean = false; + @doc("Whether or not the option is hidden") hidden?: boolean = false;