fix(openapi): add missing fields to admin user endpoints#6100
fix(openapi): add missing fields to admin user endpoints#6100gustavosbarreto merged 1 commit intomasterfrom
Conversation
|
Claude finished @luizhf42's task in 4m 3s —— View job Code Review CompleteReviewed 3 files. 1 inline issue posted (high severity). The If you've addressed the feedback and want a new review, tag |
c6aac2e to
a2239a0
Compare
a2239a0 to
8dcf71b
Compare
|
/review |
|
Claude finished @gustavosbarreto's task in 13m 38s —— View job Code Review CompleteReviewed 3 files across code quality, security, testing, language patterns, and architecture — no issues found. The code looks good as-is. The changes correctly align the OpenAPI spec with the Go backend:
If you push additional changes and want a new review, tag |
Add status field to UserAdminResponse and admin field to the
GET /admin/api/users/{id} response. Both fields are returned by the Go
backend but were missing from the OpenAPI spec, forcing the React UI to
use type workarounds.
Also adds email_marketing to both schemas and fixes the status enum from
[confirmed, pending] to [confirmed, not-confirmed] to match the actual
UserStatus constants in the backend.
Fixes: #6088
8dcf71b to
117228e
Compare
What
Aligned the OpenAPI spec for admin user endpoints with what the Go backend actually returns.
Why
The generated TypeScript SDK was missing fields that the backend sends, forcing the React UI to use type casts and intersection types as workarounds. The
statusenum also listedpendinginstead of the realnot-confirmedvalue.Closes #6088
Changes
userAdminResponse.yaml): replaced staleconfirmed: booleanwithstatus: string(enum: confirmed, not-confirmed). Addedmax_namespaces: integerandemail_marketing: boolean. Madestatusrequired.admin@api@users@{id}.yaml): addedadmin: boolean(required). Fixedstatusenum from[confirmed, pending]to[confirmed, not-confirmed]to match the GoUserStatusconstants.email_marketingwas intentionally left out of the detail endpoint — the cloudUserGetresponse struct doesn't include it. The list endpoint returns[]models.Userdirectly, which does include the field.