allow template inputs for headers and environment variables
This commit is contained in:
parent
46efa296af
commit
0d1560729f
1 changed files with 11 additions and 4 deletions
|
|
@ -193,12 +193,15 @@ components:
|
|||
environment_variables:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/NamedInput'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/NamedInput'
|
||||
- $ref: '#/components/schemas/TemplateInput'
|
||||
|
||||
UserInput:
|
||||
type: object
|
||||
properties:
|
||||
description:
|
||||
description: A description of the input, which can be used by clients to provide context to the user.
|
||||
type: string
|
||||
is_required:
|
||||
type: boolean
|
||||
|
|
@ -224,6 +227,7 @@ components:
|
|||
description: The default value for the input.
|
||||
choices:
|
||||
type: array
|
||||
description: A list of possible values for the input. If given, the user must pick one of these values.
|
||||
items:
|
||||
type: string
|
||||
example: []
|
||||
|
|
@ -271,8 +275,9 @@ components:
|
|||
name:
|
||||
type: string
|
||||
example: mount_config
|
||||
description: The name of the input, which can be used by clients as an identifier to reference the input. It is not present in the generated command line.
|
||||
description: The name of the input, which can be used by clients as an identifier to reference the input. For environment variables and headers, this is the environment variable or header names. For arguments, this is solely for reference and not part of the command line.
|
||||
description:
|
||||
description: A description of the input, which can be used by clients to provide context to the user.
|
||||
type: string
|
||||
is_required:
|
||||
type: boolean
|
||||
|
|
@ -281,7 +286,7 @@ components:
|
|||
description: Whether the input can be repeated multiple times in the command line.
|
||||
template:
|
||||
type: string
|
||||
description: The template string that will be used to generate the value. Values wrapped in `{curly_braces}` will be replaced with the corresponding properties.
|
||||
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.
|
||||
example: "--mount=type=bind,src={host_path},dst={container_path}"
|
||||
properties:
|
||||
type: object
|
||||
|
|
@ -311,7 +316,9 @@ components:
|
|||
headers:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/NamedInput'
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/NamedInput'
|
||||
- $ref: '#/components/schemas/TemplateInput'
|
||||
|
||||
ServerDetail:
|
||||
allOf:
|
||||
|
|
|
|||
Loading…
Reference in a new issue