Skip to content

Commit 0a74521

Browse files
fix(devbox): make Devbox update API patch-like (#10582)
1 parent c63f011 commit 0a74521

3 files changed

Lines changed: 26 additions & 14 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 121
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-a9327279b1ba17f0983d92a3065b04a2bc1b5e5e830cf099aef4f79072fe4075.yml
3-
openapi_spec_hash: b63815af36cf18c8cc70be416f9c0f71
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-49fd19a6c2b93ae0af51ae79c2a2a1a67adaf56611840c4d30b651729b090c63.yml
3+
openapi_spec_hash: 2d30d0e7c9061c5f748fcc915f7af4e9
44
config_hash: 2b0535779b180339d10766ba74a96700

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,17 @@ def update(
338338
timeout: float | httpx.Timeout | None | NotGiven = not_given,
339339
idempotency_key: str | None = None,
340340
) -> DevboxView:
341-
"""
342-
Updates a devbox by doing a complete update the existing name,metadata fields.
343-
It does not patch partial values.
341+
"""Updates the specified Devbox fields.
342+
343+
Omitted fields are left unchanged. An empty
344+
name clears the name, and an empty metadata map clears the metadata.
344345
345346
Args:
346-
metadata: User defined metadata to attach to the devbox for organization.
347+
metadata: User defined metadata to replace the Devbox metadata. Omit to leave unchanged or
348+
set to an empty map to clear it.
347349
348-
name: (Optional) A user specified name to give the Devbox.
350+
name: A user specified name to give the Devbox. Omit to leave unchanged or set to an
351+
empty string to clear it.
349352
350353
extra_headers: Send extra headers
351354
@@ -2188,14 +2191,17 @@ async def update(
21882191
timeout: float | httpx.Timeout | None | NotGiven = not_given,
21892192
idempotency_key: str | None = None,
21902193
) -> DevboxView:
2191-
"""
2192-
Updates a devbox by doing a complete update the existing name,metadata fields.
2193-
It does not patch partial values.
2194+
"""Updates the specified Devbox fields.
2195+
2196+
Omitted fields are left unchanged. An empty
2197+
name clears the name, and an empty metadata map clears the metadata.
21942198
21952199
Args:
2196-
metadata: User defined metadata to attach to the devbox for organization.
2200+
metadata: User defined metadata to replace the Devbox metadata. Omit to leave unchanged or
2201+
set to an empty map to clear it.
21972202
2198-
name: (Optional) A user specified name to give the Devbox.
2203+
name: A user specified name to give the Devbox. Omit to leave unchanged or set to an
2204+
empty string to clear it.
21992205
22002206
extra_headers: Send extra headers
22012207

src/runloop_api_client/types/devbox_update_params.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@
1010

1111
class DevboxUpdateParams(TypedDict, total=False):
1212
metadata: Optional[Dict[str, str]]
13-
"""User defined metadata to attach to the devbox for organization."""
13+
"""User defined metadata to replace the Devbox metadata.
14+
15+
Omit to leave unchanged or set to an empty map to clear it.
16+
"""
1417

1518
name: Optional[str]
16-
"""(Optional) A user specified name to give the Devbox."""
19+
"""A user specified name to give the Devbox.
20+
21+
Omit to leave unchanged or set to an empty string to clear it.
22+
"""

0 commit comments

Comments
 (0)