feat(generated): regenerate from spec (12 changes)#501
Conversation
…ganizationMembership.list`
Greptile Summary
Confidence Score: 4/5The generated SDK changes are mostly straightforward, but the Pipes provider request serialization needs attention before merge. Focused validation confirmed the request body behavior for the identified API surface, while the rest of the changes are generated model/service additions with matching tests. lib/workos/pipes_provider.rb
What T-Rex did
|
|
|
||
| module WorkOS |
There was a problem hiding this comment.
Type alias changes
class.name and class identity
WidgetSessionTokenResponse = ClientApiTokenResponse makes the constant a true alias — WorkOS::WidgetSessionTokenResponse.new(...).class returns WorkOS::ClientApiTokenResponse, not WorkOS::WidgetSessionTokenResponse. Any caller doing result.class.name, result.is_a?(WorkOS::WidgetSessionTokenResponse), or pattern-matching on the class will silently get different results. The same applies to UserRoleAssignmentResource = GroupRoleAssignmentResource in authorization/user_role_assignment_resource.rb. These are documented breaking changes, but the impact goes slightly beyond "symbol removed" since the constant remains accessible and appears to work, masking the identity shift.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| # frozen_string_literal: true | ||
|
|
||
| # This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| module WorkOS | ||
| class GroupRoleAssignmentList < WorkOS::Types::BaseModel | ||
| HASH_ATTRS = { | ||
| object: :object, | ||
| data: :data, | ||
| list_metadata: :list_metadata | ||
| }.freeze | ||
|
|
||
| attr_accessor \ | ||
| :object, | ||
| :data, | ||
| :list_metadata | ||
|
|
||
| def initialize(json) | ||
| hash = self.class.normalize(json) | ||
| @object = hash[:object] | ||
| @data = (hash[:data] || []).map { |item| item ? WorkOS::GroupRoleAssignment.new(item) : nil } | ||
| @list_metadata = hash[:list_metadata] ? WorkOS::ListMetadata.new(hash[:list_metadata]) : nil | ||
| end | ||
| end | ||
| end |
There was a problem hiding this comment.
GroupRoleAssignmentList model is never instantiated by the service layer
list_group_role_assignments returns a WorkOS::Types::ListStruct built via ListStruct.from_response, not a GroupRoleAssignmentList. The model class is defined and has a round-trip test but is unreachable from any service method. If it is intentionally a schema reference type (matching the raw API shape), a comment to that effect would help; otherwise it is dead code.
| body = { | ||
| "enabled" => enabled, | ||
| "scopes" => scopes, | ||
| "client_id" => client_id, | ||
| "client_secret" => client_secret | ||
| }.compact |
There was a problem hiding this comment.
scopes: nil is documented as sending JSON null so the organization can inherit provider scopes, but this request body is compacted before serialization, and the base client compacts request bodies again. When callers pass scopes: nil to clear custom scopes, the scopes key is omitted instead, so the API cannot distinguish “leave scopes unchanged” from “reset scopes to inherited defaults.”
Artifacts
Repro: focused Minitest WebMock script for scopes nil serialization
- Contains supporting evidence from the run (text/x-ruby; charset=utf-8).
Repro: verbose test output showing omitted scopes key and failing assertion
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: lib/workos/pipes_provider.rb
Line: 50-55
Comment:
**Cannot send null scopes**
`scopes: nil` is documented as sending JSON `null` so the organization can inherit provider scopes, but this request body is compacted before serialization, and the base client compacts request bodies again. When callers pass `scopes: nil` to clear custom scopes, the `scopes` key is omitted instead, so the API cannot distinguish “leave scopes unchanged” from “reset scopes to inherited defaults.”
How can I resolve this? If you propose a fix, please make it concise.
Summary
feat(organization_membership)!: Change response for
UserManagementOrganizationMembership.listUserManagementOrganizationMembership.list.feat(pipes)!: SDK surface change: Symbol "Pipes.create_data_integration_token" was removed
feat(user_management)!: Change response for
UserManagementInvitations.listUserManagementInvitations.list.feat(widgets)!: SDK surface change: Symbol "WidgetSessionTokenResponse" was removed
feat(authorization): Add authorization operations and models
ReplaceGroupRoleAssignmentEntry.ReplaceGroupRoleAssignments.DeleteGroupRoleAssignmentsByCriteria.POST /authorization/groups/{group_id}/role_assignments.PUT /authorization/groups/{group_id}/role_assignments.DELETE /authorization/groups/{group_id}/role_assignments.GET /authorization/groups/{group_id}/role_assignments/{role_assignment_id}.DELETE /authorization/groups/{group_id}/role_assignments/{role_assignment_id}.feat(client): Add client API surface
ClientApiToken.ClientApiTokenResponse.Client.feat(connect): Add Connect API surface
auth_methodtoConnectedAccount.api_key_last_4toConnectedAccount.ConnectedAccountAuthMethod.feat(groups): Add groups API surface
CreateGroupRoleAssignment.GroupRoleAssignment.GroupRoleAssignmentList.GroupRoleAssignmentResource.feat(organization_membership): Add organization membership API surface
UserOrganizationMembershipList.UserOrganizationMembershipListListMetadata.feat(pipes): Add Pipes API surface
DataIntegrationCredentials.DataIntegrationConfigurationResponse.DataIntegrationConfigurationListResponse.ConfigureDataIntegrationBody.auth_methodstoDataIntegrationsListResponseData.auth_methodtoDataIntegrationsListResponseDataConnectedAccount.api_key_last_4toDataIntegrationsListResponseDataConnectedAccount.DataIntegrationCredentialsCredentialsType.DataIntegrationsListResponseDataAuthMethods.DataIntegrationsListResponseDataConnectedAccountAuthMethod.PipesProvider.feat(user_management): Update user management API surface
UserInviteList.UserInviteListListMetadata.AuthorizationCodeSessionAuthenticateRequest.client_secretoptional.RefreshTokenSessionAuthenticateRequest.client_secretoptional.feat(widgets): Add
widgets:pipes:managetoWidgetSessionTokenScopeswidgets:pipes:managetoWidgetSessionTokenScopes.Triggered by workos/openapi-spec@0e1c039
BEGIN_COMMIT_OVERRIDE
feat(organization_membership): Change response for
UserManagementOrganizationMembership.list(#501)feat(pipes): SDK surface change: Symbol "Pipes.create_data_integration_token" was removed (#501)
feat(user_management): Change response for
UserManagementInvitations.list(#501)feat(widgets): SDK surface change: Symbol "WidgetSessionTokenResponse" was removed (#501)
feat(authorization): Add authorization operations and models (#501)
feat(client): Add client API surface (#501)
feat(connect): Add Connect API surface (#501)
feat(groups): Add groups API surface (#501)
feat(organization_membership): Add organization membership API surface (#501)
feat(pipes): Add Pipes API surface (#501)
feat(user_management): Update user management API surface (#501)
feat(widgets): Add
widgets:pipes:managetoWidgetSessionTokenScopes(#501)END_COMMIT_OVERRIDE