fix: update /builds transition example (#15657)

This commit is contained in:
Eric Paulsen
2024-11-26 00:52:23 +00:00
committed by GitHub
parent e550365e35
commit d60b58874e
5 changed files with 4 additions and 6 deletions
-1
View File
@@ -10240,7 +10240,6 @@ const docTemplate = `{
},
"transition": {
"enum": [
"create",
"start",
"stop",
"delete"
+1 -1
View File
@@ -9114,7 +9114,7 @@
"format": "uuid"
},
"transition": {
"enum": ["create", "start", "stop", "delete"],
"enum": ["start", "stop", "delete"],
"allOf": [
{
"$ref": "#/definitions/codersdk.WorkspaceTransition"
+1 -1
View File
@@ -93,7 +93,7 @@ const (
// CreateWorkspaceBuildRequest provides options to update the latest workspace build.
type CreateWorkspaceBuildRequest struct {
TemplateVersionID uuid.UUID `json:"template_version_id,omitempty" format:"uuid"`
Transition WorkspaceTransition `json:"transition" validate:"oneof=create start stop delete,required"`
Transition WorkspaceTransition `json:"transition" validate:"oneof=start stop delete,required"`
DryRun bool `json:"dry_run,omitempty"`
ProvisionerState []byte `json:"state,omitempty"`
// Orphan may be set for the Destroy transition.
+1 -1
View File
@@ -1458,7 +1458,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
],
"state": [0],
"template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",
"transition": "create"
"transition": "start"
}
```
+1 -2
View File
@@ -1400,7 +1400,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
],
"state": [0],
"template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1",
"transition": "create"
"transition": "start"
}
```
@@ -1421,7 +1421,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| Property | Value |
| ------------ | -------- |
| `log_level` | `debug` |
| `transition` | `create` |
| `transition` | `start` |
| `transition` | `stop` |
| `transition` | `delete` |