Skip to content

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

Merged
workos-sdk-automation[bot] merged 2 commits into
mainfrom
oagen/batch-4a353f07
Jun 30, 2026
Merged

feat(generated): OrganizationMembership (batch 4a353f07)#676
workos-sdk-automation[bot] merged 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 requested a review from a team as a code owner June 25, 2026 20:30
@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 a review from a team as a code owner June 25, 2026 20:30
@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR regenerates SDK models from the latest spec. The main changes are:

  • Adds roles to organization membership models and fixtures.
  • Updates generated package re-exports for common and organization-domain models.
  • Moves organization-domain round-trip coverage to the shared OrganizationDomain alias.

Confidence Score: 3/5

The generated membership deserializer can reject successful responses that still use the legacy singular role shape.

  • Current roles-array fixtures and updated generated imports execute successfully.
  • The remaining concern is backward compatibility for existing organization membership payloads or mocks that still provide role instead of roles, which can surface as an SDK exception during model construction.

src/workos/organization_membership/models/organization_membership.py

T-Rex T-Rex Logs

What T-Rex did

  • Ran trex_org_membership_contract.py against the base version to validate the organization membership roles contract; the run failed with KeyError: 'roles'.
  • Ran trex_org_membership_contract.py against the head version after the PR; the run completed with EXIT_CODE: 0 and status=200 OK for organization_membership.json and user_organization_membership.json, including the first list fixture item and the updated imports for common.OrganizationDomain and organization_domains.models.OrganizationDomain.

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/workos/organization_membership/models/organization_membership.py:65-68
**Legacy Role Payloads Fail**

When an existing membership response or mock payload still has only `role`, this required `data["roles"]` lookup raises during `from_dict`. The membership resource methods deserialize successful API responses through this path, so callers can receive an unexpected SDK error instead of an `OrganizationMembership` model.

Reviews (1): Last reviewed commit: "chore(generated): add release notes frag..." | Re-trigger Greptile

@workos-sdk-automation workos-sdk-automation Bot merged commit 7622533 into main Jun 30, 2026
10 checks passed
@workos-sdk-automation workos-sdk-automation Bot deleted the oagen/batch-4a353f07 branch June 30, 2026 13:59
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.

1 participant