Repository navigation
Conversation
Document the eleven discrepancies reported in the admin API contracts, including SSO fields and filters, pagination headers, and the empty user-deletion response. Closes supabase#2859
<!-- claude-slack-attribution --> _Requested by **Cemal Kilic** · [Slack thread](https://supabase.slack.com/archives/C022071RB2L/p1791968272007429?thread_ts=1791968272.007429&cid=C022071RB2L)_ **Before:** `openapi.yaml` says `DELETE /admin/users/{userId}` returns `200` with a `UserSchema` ("User's account data.") and documents no request body. **After:** The spec documents what the endpoint actually returns, an empty `{}` body, plus the optional `should_soft_delete` request body. This fixes the OpenAPI entry for `DELETE /admin/users/{userId}` so generated clients and docs match the server. **How:** The `adminUserDelete` handler in `internal/api/admin.go` always responds with `sendJSON(w, http.StatusOK, map[string]interface{}{})` for hard delete, soft delete, and already-soft-deleted users. It optionally reads a JSON body with `should_soft_delete`. The spec change adds an optional `requestBody` with `should_soft_delete` (boolean, default `false`) and replaces the `200` schema with `type: object`, `additionalProperties: false`, `example: {}`. Only `openapi.yaml` changes, 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.com/claude-code) https://claude.ai/code/session_0137vz1dKsd2RZigEqmeo8N3 --- _Generated by [Claude Code](https://claude.ai/code/session_0137vz1dKsd2RZigEqmeo8N3)_ Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cemal Kılıç <cemalkilic@users.noreply.github.com>
|
Could a maintainer review this admin OpenAPI correction for #2859 at It aligns the documented request fields, pagination headers, response bodies and status codes with the existing handlers. It changes the API specification rather than adding provider behavior. The PR description lists the eleven discrepancies and the validation performed. If any part of #2859 should be documented differently, please point out the expected contract. |
|
Updated against current master |
The admin OpenAPI specification still omits supported fields and advertises SSO response shapes that differ from the handlers. Align the remaining contracts from #2859 with current
master, without changing server behavior.domains, and HTTP 422 responses.inviteas a generated-link type.dedicated_scopefields.Closes #2859.
Validation on 2026-11-09, head
42bfd410f8b97ae33b07c3af3c3a833a53995093, integrated with master35307ce6c1ca59016fd820f1d77d9b6201dc2e15:git diff --checkpass; all 221 local references resolve.go test ./client/admincompiles and vets the generated package; it has no test files.openapi.yamldiffers from master.Generation changes existing Go client signatures for SSO identifiers, list parameters, deletion and response fields. Publishing generated-client changes needs a separate compatibility review, so none is included here. No live server or database test was performed for this documentation-only update.
Prepared with OpenAI Codex assistance.