Skip to content

Commit ec7b6a8

Browse files
bricefclaude
andcommitted
Fix rotate_key to return 200 with body instead of 204
ActionSet maps to PUT/204 which suppresses the response body. Changed to ActionUpdate (PATCH/200) so the new API key is returned and displayed by the CLI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 47a3f30 commit ec7b6a8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/http/testdata/openapi.golden.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@
10421042
}
10431043
},
10441044
"/actors/{name}/rotate-key": {
1045-
"put": {
1045+
"patch": {
10461046
"operationId": "actor_rotate_key",
10471047
"parameters": [
10481048
{
@@ -1055,7 +1055,7 @@
10551055
}
10561056
],
10571057
"responses": {
1058-
"204": {
1058+
"200": {
10591059
"content": {
10601060
"application/json": {
10611061
"schema": {

internal/model/operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func Operations() []Operation {
236236
// Actors
237237
Create("/actors", "Create an actor").Name("actor_create").Role(RoleAdmin).
238238
Input(CreateActorParams{}).Output(Actor{}).Build(),
239-
CustomAction(ActionSet, "/actors/{name}/rotate-key", "Rotate an actor's API key").Name("actor_rotate_key").Role(RoleAdmin).
239+
CustomAction(ActionUpdate, "/actors/{name}/rotate-key", "Rotate an actor's API key").Name("actor_rotate_key").Role(RoleAdmin).
240240
Desc("Generate a new API key for the actor. The old key is immediately invalidated. The new key is returned in the response (shown once).").
241241
Output(Actor{}).Build(),
242242
Update("/actors/{name}", "Update an actor").Name("actor_update").Role(RoleAdmin).

0 commit comments

Comments
 (0)