Skip to content

Commit 652cdb5

Browse files
committed
updated for api keys and merging IDMeta/Labels into metadata
1 parent 8066731 commit 652cdb5

File tree

4 files changed

+16
-34
lines changed

4 files changed

+16
-34
lines changed

client/devboxes/devboxes_client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generate/swagger.json

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@
11681168
},
11691169
"/orgs/{orgName}/devboxes/": {
11701170
"get": {
1171-
"description": "List devboxes. Use query param all=true to list all devboxes in org, otherwise returns user's devboxes.",
1171+
"description": "List devboxes. Use query param all=true to list all devboxes in org, otherwise returns user's devboxes. API key authentication returns org-scoped devboxes.",
11721172
"consumes": [
11731173
"application/json"
11741174
],
@@ -1227,7 +1227,7 @@
12271227
}
12281228
},
12291229
"post": {
1230-
"description": "Register a devbox with metadata. Returns 201 Created for new devbox, 200 OK if already exists.",
1230+
"description": "Register a devbox with metadata. Returns 201 Created for new devbox, 200 OK if already exists. When authenticated via API key, creates org-scoped devboxes shared across all API keys in the org.",
12311231
"consumes": [
12321232
"application/json"
12331233
],
@@ -4096,17 +4096,11 @@
40964096
"type": "object",
40974097
"properties": {
40984098
"id": {
4099-
"description": "Deterministic ID: hash of user email + metadata",
4099+
"description": "Deterministic ID: hash of user ID + metadata (for user-owned) or hash of metadata only (for API key-owned, org-scoped)",
41004100
"type": "string"
41014101
},
4102-
"idMeta": {
4103-
"description": "Metadata used to generate ID (host, machine-id, etc.)",
4104-
"type": "object",
4105-
"additionalProperties": {
4106-
"type": "string"
4107-
}
4108-
},
4109-
"labels": {
4102+
"metadata": {
4103+
"description": "Metadata (all key-value pairs). Only \"name\" and \"machine-id\" are used for ID generation.",
41104104
"type": "object",
41114105
"additionalProperties": {
41124106
"type": "string"
@@ -4116,7 +4110,7 @@
41164110
"$ref": "#/definitions/DevboxStatus"
41174111
},
41184112
"user": {
4119-
"description": "User email attribute (for display/authorization)",
4113+
"description": "User email attribute (for display/authorization). Empty string for API key-owned devboxes (org-scoped).",
41204114
"type": "string"
41214115
}
41224116
}
@@ -4127,14 +4121,8 @@
41274121
"claim": {
41284122
"type": "boolean"
41294123
},
4130-
"idMeta": {
4131-
"description": "Required: used to generate deterministic ID (host, machine-id, etc.)",
4132-
"type": "object",
4133-
"additionalProperties": {
4134-
"type": "string"
4135-
}
4136-
},
4137-
"labels": {
4124+
"metadata": {
4125+
"description": "Required: metadata key-value pairs. Only \"name\" and \"machine-id\" are used for ID generation.",
41384126
"type": "object",
41394127
"additionalProperties": {
41404128
"type": "string"

models/devbox.go

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/devbox_registration.go

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)