Skip to content

Commit 0fe2a82

Browse files
feat: Reject API key self-deletion
1 parent d547ccd commit 0fe2a82

2 files changed

Lines changed: 4 additions & 3 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: 125
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-073bade6de836ae1cf0cb3f8551cc5c6635f98649d7cf5059ef6819e9ce0f508.yml
3-
openapi_spec_hash: e84f887c72b5c7335158b706e4218bc7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-bd00e13bd6d37c150009e612ebeb6ef03d050610f80aaed517e283812c7b9ba9.yml
3+
openapi_spec_hash: 08c7c031877d6b882ff291b389937028
44
config_hash: 06186eb40e0058a2a87ac251fc07415d

apikey.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ func (r *APIKeyService) ListAutoPaging(ctx context.Context, query APIKeyListPara
9797
return pagination.NewOffsetPaginationAutoPager(r.List(ctx, query, opts...))
9898
}
9999

100-
// Delete an API key.
100+
// Delete an API key. A key cannot delete itself; use a different key to delete
101+
// this one.
101102
func (r *APIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error) {
102103
opts = slices.Concat(r.Options, opts)
103104
opts = append([]option.RequestOption{option.WithHeader("Accept", "*/*")}, opts...)

0 commit comments

Comments
 (0)