diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index 75d1d22bc..b87fd95c0 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -13336,8 +13336,11 @@ components: anyOf: - type: string - type: "null" - description: Partial profile update. Every field is optional; an omitted field is left untouched, an explicit null (or - empty string) clears it. `userId` is never accepted — it is narrowed from the session/token. + description: Partial profile update. Every field is optional and an omitted field is left untouched. An explicit null + clears any nullable field; an empty string also clears `displayName`, `dateOfBirth`, `gender`, `fullName`, + `insurerName`, `insuranceNumber` and `insurerIkNumber`. `email` is not among them — it is validated as an + address, so send null to clear it. `locale`, `timezone`, `timeFormat` and `dateFormat` are not clearable. + `userId` is never accepted — it is narrowed from the session/token. NotificationPrefsPatchRequest: type: object properties: diff --git a/src/lib/openapi/routes/profile.ts b/src/lib/openapi/routes/profile.ts index 0b9c2b671..a75fe9a11 100644 --- a/src/lib/openapi/routes/profile.ts +++ b/src/lib/openapi/routes/profile.ts @@ -252,7 +252,7 @@ const profileUpdateRequest = z .meta({ id: "ProfileUpdateRequest", description: - "Partial profile update. Every field is optional; an omitted field is left untouched, an explicit null (or empty string) clears it. `userId` is never accepted — it is narrowed from the session/token.", + "Partial profile update. Every field is optional and an omitted field is left untouched. An explicit null clears any nullable field; an empty string also clears `displayName`, `dateOfBirth`, `gender`, `fullName`, `insurerName`, `insuranceNumber` and `insurerIkNumber`. `email` is not among them — it is validated as an address, so send null to clear it. `locale`, `timezone`, `timeFormat` and `dateFormat` are not clearable. `userId` is never accepted — it is narrowed from the session/token.", }); const profileResponse = z