Repository navigation
docs: fix openapi response for DELETE /admin/users/{userId} - #2874
Merged
Merged
Conversation
Contributor
Author
|
The failing check "Test / Postgres" fails in Generated by Claude Code |
The spec documented a 200 response returning UserSchema, but the adminUserDelete handler always returns an empty JSON object for hard delete, soft delete, and already soft-deleted users. Document the empty object response and the optional should_soft_delete request body. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137vz1dKsd2RZigEqmeo8N3
hf
force-pushed
the
claude/fix-openapi-admin-delete-user
branch
from
October 30, 2026 07:21
c31d313 to
fb45c32
Compare
cemalkilic
marked this pull request as ready for review
November 3, 2026 16:20
annabkr
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Cemal Kilic · Slack thread
Before:
openapi.yamlsaysDELETE /admin/users/{userId}returns200with aUserSchema("User's account data.") and documents no request body.After: The spec documents what the endpoint actually returns, an empty
{}body, plus the optionalshould_soft_deleterequest body.This fixes the OpenAPI entry for
DELETE /admin/users/{userId}so generated clients and docs match the server.How: The
adminUserDeletehandler ininternal/api/admin.goalways responds withsendJSON(w, http.StatusOK, map[string]interface{}{})for hard delete, soft delete, and already-soft-deleted users. It optionally reads a JSON body withshould_soft_delete. The spec change adds an optionalrequestBodywithshould_soft_delete(boolean, defaultfalse) and replaces the200schema withtype: object,additionalProperties: false,example: {}. Onlyopenapi.yamlchanges, and only this one operation. No Go changes.Overlaps with the DELETE /admin/users/{userId} hunk in #2866 (credit to haranishi); this is a narrow version so that endpoint can land independently. Context: supabase/supabase-js#2758.
🤖 Generated with Claude Code
https://claude.ai/code/session_0137vz1dKsd2RZigEqmeo8N3
Generated by Claude Code