Skip to content

Commit 4eab008

Browse files
committed
fix: remove duplicate package declaration in test; revert premature snapshotID from spec
- Remove duplicate 'package snapshotcache' line in snapshot_cache_test.go (caused compile error, caught by Codex/Gemini review) - Revert snapshotID field from NewSandbox schema and related descriptions in openapi.yml — backend handler not yet implemented, advertising it breaks the API contract (caught by Codex P2 review)
1 parent c8e62f6 commit 4eab008

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

packages/api/internal/cache/snapshots/snapshot_cache_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
package snapshotcache
2-
package snapshotcache
32

43
import (
54
"testing"

spec/openapi.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -633,13 +633,12 @@ components:
633633
$ref: "#/components/schemas/SandboxMetric"
634634

635635
NewSandbox:
636+
required:
637+
- templateID
636638
properties:
637639
templateID:
638640
type: string
639-
description: Identifier of the required template. Either templateID or snapshotID must be provided.
640-
snapshotID:
641-
type: string
642-
description: Identifier of the snapshot to resume from. Either templateID or snapshotID must be provided. When specified, the sandbox will be created from the snapshot state.
641+
description: Identifier of the required template.
643642
timeout:
644643
type: integer
645644
format: int32
@@ -1988,7 +1987,7 @@ paths:
19881987
"500":
19891988
$ref: "#/components/responses/500"
19901989
post:
1991-
description: Create a sandbox from a template or snapshot. Provide either templateID to create from a template, or snapshotID to resume from a paused sandbox snapshot.
1990+
description: Create a new sandbox from a template.
19921991
tags: [sandboxes]
19931992
security:
19941993
- ApiKeyAuth: []
@@ -2276,7 +2275,7 @@ paths:
22762275

22772276
/sandboxes/{sandboxID}/pause:
22782277
post:
2279-
description: Pause the sandbox. This creates an automatic snapshot of the sandbox state that can be used to resume it later via POST /sandboxes with the snapshotID parameter.
2278+
description: Pause the sandbox. This creates an automatic snapshot of the sandbox state that can be used to resume it later.
22802279
tags: [sandboxes]
22812280
security:
22822281
- ApiKeyAuth: []
@@ -2299,7 +2298,7 @@ paths:
22992298
/sandboxes/{sandboxID}/resume:
23002299
post:
23012300
deprecated: true
2302-
description: Resume the sandbox. DEPRECATED - Use POST /sandboxes with snapshotID parameter instead to create a new sandbox from a snapshot.
2301+
description: Resume the sandbox. DEPRECATED - Use POST /sandboxes instead.
23032302
tags: [sandboxes]
23042303
security:
23052304
- ApiKeyAuth: []
@@ -2315,7 +2314,7 @@ paths:
23152314
$ref: "#/components/schemas/ResumedSandbox"
23162315
responses:
23172316
"201":
2318-
description: The sandbox was resumed successfully. This endpoint is deprecated - use POST /sandboxes with snapshotID instead.
2317+
description: The sandbox was resumed successfully. This endpoint is deprecated.
23192318
content:
23202319
application/json:
23212320
schema:

0 commit comments

Comments
 (0)