Skip to content

Commit 34e1c59

Browse files
committed
feat: use DELETE for multitenancy subwallet removal
Replace POST /multitenancy/wallet/{wallet_id}/remove with DELETE /multitenancy/wallet/{wallet_id} for REST consistency. Updates docs and regenerated OpenAPI/Swagger specs. Signed-off-by: Emiliano Suñé <2395873+esune@users.noreply.github.com>
1 parent 4d34fe6 commit 34e1c59

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

acapy_agent/multitenant/admin/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ async def register(app: web.Application):
691691
web.get("/multitenancy/wallet/{wallet_id}", wallet_get, allow_head=False),
692692
web.put("/multitenancy/wallet/{wallet_id}", wallet_update),
693693
web.post("/multitenancy/wallet/{wallet_id}/token", wallet_create_token),
694-
web.post("/multitenancy/wallet/{wallet_id}/remove", wallet_remove),
694+
web.delete("/multitenancy/wallet/{wallet_id}", wallet_remove),
695695
]
696696
)
697697

docs/features/Multitenancy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ The following information is required to delete a tenant:
367367
Example
368368

369369
```sh
370-
curl -X POST "${ACAPY_ADMIN_URL}/multitenancy/wallet/{wallet_id}/remove" \
370+
curl -X DELETE "${ACAPY_ADMIN_URL}/multitenancy/wallet/{wallet_id}" \
371371
-H "Content-Type: application/json" \
372372
-H "x-api-key: $ACAPY_ADMIN_URL_API_KEY" \
373373
-d '{ "wallet_key": "example-encryption-key-02" }'

open-api/openapi.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,10 +3932,8 @@
39323932
"summary" : "Update a subwallet",
39333933
"tags" : [ "multitenancy" ],
39343934
"x-codegen-request-body-name" : "body"
3935-
}
3936-
},
3937-
"/multitenancy/wallet/{wallet_id}/remove" : {
3938-
"post" : {
3935+
},
3936+
"delete" : {
39393937
"parameters" : [ {
39403938
"description" : "Subwallet identifier",
39413939
"in" : "path",

open-api/swagger.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3244,10 +3244,8 @@
32443244
}
32453245
}
32463246
}
3247-
}
3248-
},
3249-
"/multitenancy/wallet/{wallet_id}/remove" : {
3250-
"post" : {
3247+
},
3248+
"delete" : {
32513249
"tags" : [ "multitenancy" ],
32523250
"summary" : "Remove a subwallet",
32533251
"produces" : [ "application/json" ],

0 commit comments

Comments
 (0)