Skip to content

Commit a6d2f56

Browse files
Add argument ordinal
1 parent 2589217 commit a6d2f56

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

draft.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ This is the root object of the OpenCLI Description.
141141
| Field Name | Type | Description |
142142
|------------|:----:|-------------|
143143
| required | `bool` | Whether or not the argument is required |
144+
| ordinal | `int` | The relative position to other arguments |
144145
| acceptedValues | [`string`] | A list of accepted values |
145146
| group | `string` | The argument group |
146147
| decription | `string` | The argument description |

schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@
180180
"type": "boolean",
181181
"description": "Whether or not the argument is required"
182182
},
183+
"ordinal": {
184+
"type": "integer",
185+
"description": "The relative position to other arguments"
186+
},
183187
"acceptedValues": {
184188
"type": "array",
185189
"items": {

site/docs/spec.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ This is the root object of the OpenCLI Description.
154154
| Field Name | Type | Description |
155155
|------------|:----:|-------------|
156156
| required | `bool` | Whether or not the argument is required |
157+
| ordinal | `int` | The relative position to other arguments |
157158
| acceptedValues | [`string`] | A list of accepted values |
158159
| group | `string` | The argument group |
159160
| decription | `string` | The argument description |

typespec/main.tsp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ model Argument {
113113
@doc("Whether or not the argument is required")
114114
required?: boolean;
115115

116+
@doc("The relative position to other arguments")
117+
ordinal?: integer;
118+
116119
@doc("A list of accepted values")
117120
acceptedValues?: string[];
118121

0 commit comments

Comments
 (0)