Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This document is licensed under the MIT license

| Date | Author | Description |
|------|--------|-------------|
| 2026-03-24 | Bob Lail | Add default value for `arity` to [Argument Object](#argument-object) |
| 2025-07-15 | Patrik Svensson | Added `interactive` to root command and commands |
| 2025-07-16 | Patrik Svensson | Added [Metadata Object](#metadata-object) |
| 2025-07-16 | Patrik Svensson | Changed maps to arrays |
Expand Down Expand Up @@ -167,7 +168,7 @@ This is the root object of the OpenCLI Description.
|------------|:----:|---------------|-------------|
| name | `string` | - | **REQUIRED** The argument name |
| required | `bool` | `false` | Whether or not the argument is required |
| arity | [Arity Object](#arity-object) | - | The argument arity. Arity defines the minimum and maximum number of argument values |
| arity | [Arity Object](#arity-object) | `{"minimum": 1, "maximum": 1}` | The argument arity. Arity defines the minimum and maximum number of argument values |
| acceptedValues | [`string`] | - | A list of accepted values |
| group | `string` | - | The argument group |
| description | `string` | - | The argument description |
Expand Down
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
},
"arity": {
"$ref": "#/$defs/Arity",
"default": {
"minimum": 1,
"maximum": 1
},
"description": "The argument arity. Arity defines the minimum and maximum number of argument values"
},
"acceptedValues": {
Expand Down
2 changes: 1 addition & 1 deletion typespec/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ model Argument {
required?: boolean = false;

@doc("The argument arity. Arity defines the minimum and maximum number of argument values")
arity?: Arity;
arity?: Arity = #{ minimum: 1, maximum: 1 };

@doc("A list of accepted values")
acceptedValues?: string[];
Expand Down