feat(generated): OrganizationMembership (batch 4a353f07)#398
feat(generated): OrganizationMembership (batch 4a353f07)#398workos-sdk-automation[bot] wants to merge 2 commits into
Conversation
Greptile SummaryThis PR regenerates the organization membership SDK model. The main changes are:
Confidence Score: 3/5The generated model can reject compatible organization membership responses that omit the new roles field.
src/main/kotlin/com/workos/models/OrganizationMembership.kt
What T-Rex did
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
src/main/kotlin/com/workos/models/OrganizationMembership.kt:45
**Required Roles Break Compatibility**
When an `organization_membership` response omits the new `roles` field, Jackson has no value for this non-null constructor parameter and request parsing can fail instead of accepting a still-compatible response. The same required parameter also breaks existing callers that construct `OrganizationMembership` without `roles`; defaulting it keeps old responses and source calls working.
Reviews (1): Last reviewed commit: "chore(generated): add release notes frag..." | Re-trigger Greptile |
|
|
||
| /** The list of roles assigned to the user within the organization. */ | ||
| @JsonProperty("roles") | ||
| val roles: List<SlimRole>, |
There was a problem hiding this comment.
Required Roles Break Compatibility
When an organization_membership response omits the new roles field, Jackson has no value for this non-null constructor parameter and request parsing can fail instead of accepting a still-compatible response. The same required parameter also breaks existing callers that construct OrganizationMembership without roles; defaulting it keeps old responses and source calls working.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/main/kotlin/com/workos/models/OrganizationMembership.kt
Line: 45
Comment:
**Required Roles Break Compatibility**
When an `organization_membership` response omits the new `roles` field, Jackson has no value for this non-null constructor parameter and request parsing can fail instead of accepting a still-compatible response. The same required parameter also breaks existing callers that construct `OrganizationMembership` without `roles`; defaulting it keeps old responses and source calls working.
How can I resolve this? If you propose a fix, please make it concise.
Summary
Regenerated SDK from spec changes.
Triggered by workos/openapi-spec@053f61e