Skip to content

Commit 6e35e82

Browse files
committed
is_repeated tweaks, name positional args, template properties->variables
1 parent 368afdf commit 6e35e82

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

api/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
6868
"package_arguments": [
6969
{
7070
"type": "positional",
71+
"name": "target_dir",
7172
"description": "Path to access",
7273
"default": "/Users/username/Desktop",
7374
"is_required": true,
@@ -94,7 +95,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
9495
"template": "--mount=type=bind,src={source_path},dst={target_path}",
9596
"is_required": true,
9697
"is_repeated": true,
97-
"properties": {
98+
"variables": {
9899
"source_path": {
99100
"description": "Source path on host",
100101
"format": "filepath",
@@ -111,6 +112,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
111112
"package_arguments": [
112113
{
113114
"type": "positional",
115+
"name": "target_dir",
114116
"value": "/project",
115117
}
116118
]
@@ -220,7 +222,7 @@ API Response:
220222
"template": "--mount=type=bind,src={source_path},dst={target_path}",
221223
"is_required": true,
222224
"is_repeated": true,
223-
"properties": {
225+
"variables": {
224226
"source_path": {
225227
"description": "Source path on host",
226228
"format": "filepath",
@@ -237,6 +239,7 @@ API Response:
237239
"package_arguments": [
238240
{
239241
"type": "positional",
242+
"name": "target_dir",
240243
"value": "/project",
241244
}
242245
]

api/openapi.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,6 @@ components:
206206
is_required:
207207
type: boolean
208208
default: false
209-
is_repeated:
210-
type: boolean
211-
description: Whether the input can be repeated multiple times in the command line.
212-
default: false
213209
format:
214210
type: string
215211
description: Input format. Includes a variety of standardized formats, including `filepath`, which should be interpreted as a file on the user's filesystem.
@@ -239,11 +235,20 @@ components:
239235
- type: object
240236
required:
241237
- type
238+
- name
242239
properties:
243240
type:
244241
type: string
245242
enum: [positional]
246243
example: "positional"
244+
name:
245+
type: string
246+
description: Name of the positional argument. This is not part of the command line, but can be used for reference by client configuration.
247+
example: file_path
248+
is_repeated:
249+
type: boolean
250+
description: Whether the input can be repeated multiple times in the command line.
251+
default: false
247252

248253
NamedInput:
249254
description: A command-line `--flag={value}`, named environment variable or header.
@@ -261,6 +266,10 @@ components:
261266
name:
262267
type: string
263268
example: "--port"
269+
is_repeated:
270+
type: boolean
271+
description: Whether the argument or header can be repeated multiple times. Has no effect for environment variables.
272+
default: false
264273

265274
TemplateInput:
266275
- type: object
@@ -281,14 +290,16 @@ components:
281290
type: string
282291
is_required:
283292
type: boolean
293+
default: false
284294
is_repeated:
285295
type: boolean
286-
description: Whether the input can be repeated multiple times in the command line.
296+
description: Whether the argument or header can be repeated multiple times. Has no effect for environment variables.
297+
default: false
287298
template:
288299
type: string
289-
description: The template string that will be used to generate the value. Values wrapped in `{curly_braces}` will be replaced with the corresponding properties. Input which is not `is_required` is replaced with its `default` value, or otherwise an empty string.
300+
description: The template string that will be used to generate the value. Values wrapped in `{curly_braces}` will be replaced with the corresponding variables. Input which is not `is_required` is replaced with its `default` value, or otherwise an empty string.
290301
example: "--mount=type=bind,src={host_path},dst={container_path}"
291-
properties:
302+
variables:
292303
type: object
293304
additionalProperties:
294305
$ref: '#/components/schemas/UserInput'

0 commit comments

Comments
 (0)