Skip to content

feat(generated): OrganizationMembership (batch e471ddef)#113

Closed
workos-sdk-automation[bot] wants to merge 2 commits into
mainfrom
oagen/batch-e471ddef
Closed

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

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Regenerated SDK from spec changes.

Triggered by workos/openapi-spec@75604c7

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR regenerates the Rust SDK from an updated spec. The main changes are:

  • New generated module exports for auth, pipes, and session reauthentication shapes.
  • Added roles arrays to organization membership models and fixtures.
  • Updated generator metadata and pending changelog entries.

Confidence Score: 2/5

Not safe to merge. The crate can fail to compile from missing generated modules and a removed organization-domain export.

  • The crate declares generated modules that do not have source files.
  • Organization domain resource methods still return a type removed from the model exports.
  • Membership responses can fail to deserialize when roles is omitted.

src/models/mod.rs, src/enums/mod.rs, src/models/organization_membership.rs, src/models/user_organization_membership.rs

Important Files Changed

Filename Overview
src/models/mod.rs Adds generated model exports without matching source files and removes an organization domain model still used by resource methods.
src/enums/mod.rs Adds session reauthentication enum exports without matching generated enum files.
src/models/organization_membership.rs Adds roles as a required field on organization membership responses.
src/models/user_organization_membership.rs Adds roles as a required field on user organization membership responses.
Prompt To Fix All With AI
Fix the following 5 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 5
src/models/mod.rs:43
**Missing Generated Model Files**

This `mod` declaration requires a matching Rust source file, but the generated model file is not present. The same missing-file pattern applies to the newly declared pipes and session reauthentication model modules in this file, so the crate can fail to compile with `file not found for module` before SDK consumers can use it.

### Issue 2 of 5
src/enums/mod.rs:98-99
**Missing Generated Enum Files**

These new enum module declarations require matching files under `src/enums/`, but the generated enum files are not present. Building the crate can fail immediately with `file not found for module` for the session reauthentication auth method and status enums.

### Issue 3 of 5
src/models/mod.rs:338
**Removed Export Still Returned**

Removing `organization_domain_stand_alone` from the model module tree leaves the organization domain resource methods returning a type that is no longer exported through `crate::models::*`. Calls like `get_organization_domain` and `verify_organization_domain` still return `OrganizationDomainStandAlone`, so the crate can fail to compile with that type unresolved.

### Issue 4 of 5
src/models/organization_membership.rs:34-35
**Missing Roles Rejects Responses**

This makes `roles` required during deserialization. If the API returns an organization membership with the existing `role` field but omits the new `roles` array, create or deactivate membership calls can receive a successful HTTP response and still fail with a serde `missing field 'roles'` error.

```suggestion
    /// The list of roles assigned to the user within the organization.
    #[serde(default)]
    pub roles: Vec<SlimRole>,
```

### Issue 5 of 5
src/models/user_organization_membership.rs:34-35
**Missing Roles Rejects Memberships**

This field is required for every user organization membership response. If list, get, update, or reactivate returns a membership with `role` but without `roles`, deserialization fails instead of returning the membership to the caller.

```suggestion
    /// The list of roles assigned to the user within the organization.
    #[serde(default)]
    pub roles: Vec<SlimRole>,
```

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

Comment thread src/models/mod.rs
mod audit_log_schema_target;
mod audit_log_schema_target_input;
mod audit_logs_retention;
mod auth_method_mismatch_error;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Missing Generated Model Files

This mod declaration requires a matching Rust source file, but the generated model file is not present. The same missing-file pattern applies to the newly declared pipes and session reauthentication model modules in this file, so the crate can fail to compile with file not found for module before SDK consumers can use it.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/mod.rs
Line: 43

Comment:
**Missing Generated Model Files**

This `mod` declaration requires a matching Rust source file, but the generated model file is not present. The same missing-file pattern applies to the newly declared pipes and session reauthentication model modules in this file, so the crate can fail to compile with `file not found for module` before SDK consumers can use it.

How can I resolve this? If you propose a fix, please make it concise.

Comment thread src/enums/mod.rs
Comment on lines +98 to +99
pub mod session_reauthenticated_data_auth_method;
pub mod session_reauthenticated_data_status;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Missing Generated Enum Files

These new enum module declarations require matching files under src/enums/, but the generated enum files are not present. Building the crate can fail immediately with file not found for module for the session reauthentication auth method and status enums.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/enums/mod.rs
Line: 98-99

Comment:
**Missing Generated Enum Files**

These new enum module declarations require matching files under `src/enums/`, but the generated enum files are not present. Building the crate can fail immediately with `file not found for module` for the session reauthentication auth method and status enums.

How can I resolve this? If you propose a fix, please make it concise.

Comment thread src/models/mod.rs
@@ -337,7 +338,6 @@ mod organization_domain_created_data;
mod organization_domain_data;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Removed Export Still Returned

Removing organization_domain_stand_alone from the model module tree leaves the organization domain resource methods returning a type that is no longer exported through crate::models::*. Calls like get_organization_domain and verify_organization_domain still return OrganizationDomainStandAlone, so the crate can fail to compile with that type unresolved.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/mod.rs
Line: 338

Comment:
**Removed Export Still Returned**

Removing `organization_domain_stand_alone` from the model module tree leaves the organization domain resource methods returning a type that is no longer exported through `crate::models::*`. Calls like `get_organization_domain` and `verify_organization_domain` still return `OrganizationDomainStandAlone`, so the crate can fail to compile with that type unresolved.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +34 to +35
/// The list of roles assigned to the user within the organization.
pub roles: Vec<SlimRole>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Missing Roles Rejects Responses

This makes roles required during deserialization. If the API returns an organization membership with the existing role field but omits the new roles array, create or deactivate membership calls can receive a successful HTTP response and still fail with a serde missing field 'roles' error.

Suggested change
/// The list of roles assigned to the user within the organization.
pub roles: Vec<SlimRole>,
/// The list of roles assigned to the user within the organization.
#[serde(default)]
pub roles: Vec<SlimRole>,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/organization_membership.rs
Line: 34-35

Comment:
**Missing Roles Rejects Responses**

This makes `roles` required during deserialization. If the API returns an organization membership with the existing `role` field but omits the new `roles` array, create or deactivate membership calls can receive a successful HTTP response and still fail with a serde `missing field 'roles'` error.

```suggestion
    /// The list of roles assigned to the user within the organization.
    #[serde(default)]
    pub roles: Vec<SlimRole>,
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +34 to +35
/// The list of roles assigned to the user within the organization.
pub roles: Vec<SlimRole>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Missing Roles Rejects Memberships

This field is required for every user organization membership response. If list, get, update, or reactivate returns a membership with role but without roles, deserialization fails instead of returning the membership to the caller.

Suggested change
/// The list of roles assigned to the user within the organization.
pub roles: Vec<SlimRole>,
/// The list of roles assigned to the user within the organization.
#[serde(default)]
pub roles: Vec<SlimRole>,
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/models/user_organization_membership.rs
Line: 34-35

Comment:
**Missing Roles Rejects Memberships**

This field is required for every user organization membership response. If list, get, update, or reactivate returns a membership with `role` but without `roles`, deserialization fails instead of returning the membership to the caller.

```suggestion
    /// The list of roles assigned to the user within the organization.
    #[serde(default)]
    pub roles: Vec<SlimRole>,
```

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

Development

Successfully merging this pull request may close these issues.

0 participants