feat: add base template variables to API (#26425)

This commit is contained in:
Jeremy Ruppel
2026-06-17 12:22:35 -04:00
committed by GitHub
parent 6c95a618b4
commit 87de6dc23e
11 changed files with 258 additions and 54 deletions
+61 -24
View File
@@ -11883,19 +11883,32 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
"icon": "string",
"id": "string",
"name": "string",
"os": "string"
"os": "string",
"variables": [
{
"default": [
0
],
"description": "string",
"name": "string",
"required": true,
"sensitive": true,
"type": "string"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|---------------|--------|----------|--------------|-------------|
| `description` | string | false | | |
| `icon` | string | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `os` | string | false | | |
| Name | Type | Required | Restrictions | Description |
|---------------|-------------------------------------------------------------------------------------------|----------|--------------|-------------|
| `description` | string | false | | |
| `icon` | string | false | | |
| `id` | string | false | | |
| `name` | string | false | | |
| `os` | string | false | | |
| `variables` | array of [codersdk.TemplateBuilderModuleVariable](#codersdktemplatebuildermodulevariable) | false | | |
## codersdk.TemplateBuilderBasesResponse
@@ -11907,7 +11920,19 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
"icon": "string",
"id": "string",
"name": "string",
"os": "string"
"os": "string",
"variables": [
{
"default": [
0
],
"description": "string",
"name": "string",
"required": true,
"sensitive": true,
"type": "string"
}
]
}
]
}
@@ -11944,6 +11969,10 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
```json
{
"base_template_id": "string",
"base_variable_values": {
"property1": "string",
"property2": "string"
},
"modules": [
{
"id": "string",
@@ -11958,10 +11987,12 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
### Properties
| Name | Type | Required | Restrictions | Description |
|--------------------|-----------------------------------------------------------------------------------------|----------|--------------|-------------|
| `base_template_id` | string | false | | |
| `modules` | array of [codersdk.TemplateBuilderComposeModule](#codersdktemplatebuildercomposemodule) | false | | |
| Name | Type | Required | Restrictions | Description |
|------------------------|-----------------------------------------------------------------------------------------|----------|--------------|-------------|
| `base_template_id` | string | false | | |
| `base_variable_values` | object | false | | |
| » `[any property]` | string | false | | |
| `modules` | array of [codersdk.TemplateBuilderComposeModule](#codersdktemplatebuildercomposemodule) | false | | |
## codersdk.TemplateBuilderConfig
@@ -11984,6 +12015,10 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
```json
{
"base_template_id": "string",
"base_variable_values": {
"property1": "string",
"property2": "string"
},
"description": "string",
"display_name": "string",
"icon": "string",
@@ -12007,17 +12042,19 @@ Restarts will only happen on weekdays in this list on weeks which line up with W
### Properties
| Name | Type | Required | Restrictions | Description |
|--------------------|-----------------------------------------------------------------------------------------|----------|--------------|-------------|
| `base_template_id` | string | false | | |
| `description` | string | false | | |
| `display_name` | string | false | | |
| `icon` | string | false | | |
| `modules` | array of [codersdk.TemplateBuilderComposeModule](#codersdktemplatebuildercomposemodule) | false | | |
| `name` | string | true | | |
| `organization_id` | string | true | | |
| `provisioner_tags` | object | false | | |
| » `[any property]` | string | false | | |
| Name | Type | Required | Restrictions | Description |
|------------------------|-----------------------------------------------------------------------------------------|----------|--------------|-------------|
| `base_template_id` | string | false | | |
| `base_variable_values` | object | false | | |
| » `[any property]` | string | false | | |
| `description` | string | false | | |
| `display_name` | string | false | | |
| `icon` | string | false | | |
| `modules` | array of [codersdk.TemplateBuilderComposeModule](#codersdktemplatebuildercomposemodule) | false | | |
| `name` | string | true | | |
| `organization_id` | string | true | | |
| `provisioner_tags` | object | false | | |
| » `[any property]` | string | false | | |
## codersdk.TemplateBuilderCreateTemplateResponse
+21 -1
View File
@@ -25,7 +25,19 @@ curl -X GET http://coder-server:8080/api/v2/templatebuilder/bases \
"icon": "string",
"id": "string",
"name": "string",
"os": "string"
"os": "string",
"variables": [
{
"default": [
0
],
"description": "string",
"name": "string",
"required": true,
"sensitive": true,
"type": "string"
}
]
}
]
}
@@ -57,6 +69,10 @@ curl -X POST http://coder-server:8080/api/v2/templatebuilder/compose \
```json
{
"base_template_id": "string",
"base_variable_values": {
"property1": "string",
"property2": "string"
},
"modules": [
{
"id": "string",
@@ -102,6 +118,10 @@ curl -X POST http://coder-server:8080/api/v2/templatebuilder/compose/template \
```json
{
"base_template_id": "string",
"base_variable_values": {
"property1": "string",
"property2": "string"
},
"description": "string",
"display_name": "string",
"icon": "string",