Skip to content

feat(generated): OrganizationMembership (batch 4a353f07)#398

Open
workos-sdk-automation[bot] wants to merge 2 commits into
mainfrom
oagen/batch-4a353f07
Open

feat(generated): OrganizationMembership (batch 4a353f07)#398
workos-sdk-automation[bot] wants to merge 2 commits into
mainfrom
oagen/batch-4a353f07

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Regenerated SDK from spec changes.

Triggered by workos/openapi-spec@053f61e

@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Jun 25, 2026
@workos-sdk-automation workos-sdk-automation Bot requested review from a team as code owners June 25, 2026 20:31
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Jun 25, 2026
@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR regenerates the organization membership SDK model. The main changes are:

  • Adds roles to OrganizationMembership.
  • Updates organization membership test fixtures to include roles.
  • Records the changelog entry and synced spec SHA.

Confidence Score: 3/5

The generated model can reject compatible organization membership responses that omit the new roles field.

  • The changed constructor makes roles required for deserialization and source construction.
  • Existing API responses or caller code that do not yet provide roles can fail even though the SDK change is intended to be generated compatibility work.
  • Runtime contract checks for roles-present behavior were blocked by the local environment before Kotlin execution could run, so they did not add a confirmed mismatch.

src/main/kotlin/com/workos/models/OrganizationMembership.kt

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex ran the targeted Gradle test command on the base checkout and encountered an environment failure due to JAVA_HOME not being set.
  • T-Rex attempted the same targeted Gradle test command on the head checkout and observed the same environment failure before execution, with Kotlin compilation/test runtime not reached.

View all artifacts

T-Rex Ran code and verified through T-Rex

Prompt To Fix All With AI
Fix 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>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

0 participants