mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add form_type parameter argument to db (#17920)
`form_type` is a new parameter field in the terraform provider. Bring that field into coder/coder. Validation for `multi-select` has also been added.
This commit is contained in:
Generated
+31
-18
@@ -7185,6 +7185,7 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
|
||||
"description_plaintext": "string",
|
||||
"display_name": "string",
|
||||
"ephemeral": true,
|
||||
"form_type": "",
|
||||
"icon": "string",
|
||||
"mutable": true,
|
||||
"name": "string",
|
||||
@@ -7208,29 +7209,41 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-------------------------|---------------------------------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `default_value` | string | false | | |
|
||||
| `description` | string | false | | |
|
||||
| `description_plaintext` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `ephemeral` | boolean | false | | |
|
||||
| `icon` | string | false | | |
|
||||
| `mutable` | boolean | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `options` | array of [codersdk.TemplateVersionParameterOption](#codersdktemplateversionparameteroption) | false | | |
|
||||
| `required` | boolean | false | | |
|
||||
| `type` | string | false | | |
|
||||
| `validation_error` | string | false | | |
|
||||
| `validation_max` | integer | false | | |
|
||||
| `validation_min` | integer | false | | |
|
||||
| `validation_monotonic` | [codersdk.ValidationMonotonicOrder](#codersdkvalidationmonotonicorder) | false | | |
|
||||
| `validation_regex` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|-------------------------|---------------------------------------------------------------------------------------------|----------|--------------|----------------------------------------------------------------------------------------------------|
|
||||
| `default_value` | string | false | | |
|
||||
| `description` | string | false | | |
|
||||
| `description_plaintext` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `ephemeral` | boolean | false | | |
|
||||
| `form_type` | string | false | | Form type has an enum value of empty string, `""`. Keep the leading comma in the enums struct tag. |
|
||||
| `icon` | string | false | | |
|
||||
| `mutable` | boolean | false | | |
|
||||
| `name` | string | false | | |
|
||||
| `options` | array of [codersdk.TemplateVersionParameterOption](#codersdktemplateversionparameteroption) | false | | |
|
||||
| `required` | boolean | false | | |
|
||||
| `type` | string | false | | |
|
||||
| `validation_error` | string | false | | |
|
||||
| `validation_max` | integer | false | | |
|
||||
| `validation_min` | integer | false | | |
|
||||
| `validation_monotonic` | [codersdk.ValidationMonotonicOrder](#codersdkvalidationmonotonicorder) | false | | |
|
||||
| `validation_regex` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
|------------------------|----------------|
|
||||
| `form_type` | `` |
|
||||
| `form_type` | `radio` |
|
||||
| `form_type` | `dropdown` |
|
||||
| `form_type` | `input` |
|
||||
| `form_type` | `textarea` |
|
||||
| `form_type` | `slider` |
|
||||
| `form_type` | `checkbox` |
|
||||
| `form_type` | `switch` |
|
||||
| `form_type` | `tag-select` |
|
||||
| `form_type` | `multi-select` |
|
||||
| `form_type` | `error` |
|
||||
| `type` | `string` |
|
||||
| `type` | `number` |
|
||||
| `type` | `bool` |
|
||||
|
||||
Generated
+36
-23
@@ -3165,6 +3165,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
"description_plaintext": "string",
|
||||
"display_name": "string",
|
||||
"ephemeral": true,
|
||||
"form_type": "",
|
||||
"icon": "string",
|
||||
"mutable": true,
|
||||
"name": "string",
|
||||
@@ -3197,34 +3198,46 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|---------------------------|----------------------------------------------------------------------------------|----------|--------------|-------------|
|
||||
| `[array item]` | array | false | | |
|
||||
| `» default_value` | string | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» description_plaintext` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» ephemeral` | boolean | false | | |
|
||||
| `» icon` | string | false | | |
|
||||
| `» mutable` | boolean | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» options` | array | false | | |
|
||||
| `»» description` | string | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» required` | boolean | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» validation_error` | string | false | | |
|
||||
| `» validation_max` | integer | false | | |
|
||||
| `» validation_min` | integer | false | | |
|
||||
| `» validation_monotonic` | [codersdk.ValidationMonotonicOrder](schemas.md#codersdkvalidationmonotonicorder) | false | | |
|
||||
| `» validation_regex` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|---------------------------|----------------------------------------------------------------------------------|----------|--------------|----------------------------------------------------------------------------------------------------|
|
||||
| `[array item]` | array | false | | |
|
||||
| `» default_value` | string | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» description_plaintext` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» ephemeral` | boolean | false | | |
|
||||
| `» form_type` | string | false | | Form type has an enum value of empty string, `""`. Keep the leading comma in the enums struct tag. |
|
||||
| `» icon` | string | false | | |
|
||||
| `» mutable` | boolean | false | | |
|
||||
| `» name` | string | false | | |
|
||||
| `» options` | array | false | | |
|
||||
| `»» description` | string | false | | |
|
||||
| `»» icon` | string | false | | |
|
||||
| `»» name` | string | false | | |
|
||||
| `»» value` | string | false | | |
|
||||
| `» required` | boolean | false | | |
|
||||
| `» type` | string | false | | |
|
||||
| `» validation_error` | string | false | | |
|
||||
| `» validation_max` | integer | false | | |
|
||||
| `» validation_min` | integer | false | | |
|
||||
| `» validation_monotonic` | [codersdk.ValidationMonotonicOrder](schemas.md#codersdkvalidationmonotonicorder) | false | | |
|
||||
| `» validation_regex` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Property | Value |
|
||||
|------------------------|----------------|
|
||||
| `form_type` | `` |
|
||||
| `form_type` | `radio` |
|
||||
| `form_type` | `dropdown` |
|
||||
| `form_type` | `input` |
|
||||
| `form_type` | `textarea` |
|
||||
| `form_type` | `slider` |
|
||||
| `form_type` | `checkbox` |
|
||||
| `form_type` | `switch` |
|
||||
| `form_type` | `tag-select` |
|
||||
| `form_type` | `multi-select` |
|
||||
| `form_type` | `error` |
|
||||
| `type` | `string` |
|
||||
| `type` | `number` |
|
||||
| `type` | `bool` |
|
||||
|
||||
Reference in New Issue
Block a user