feat: replace hand-written URL builders with generated ones - #529
Conversation
…ones The Ruby emitter now generates url-builder methods (regenerated from oagen-emitters) with an optional per-call client_id override that falls back to the client's configured value. Delete the hand-maintained fence copies they replace: - UserManagement#get_authorization_url (H09) and #get_logout_url - SSO#get_authorization_url (H14) The generated builders serialize provider_scopes (CSV) and provider_query_params (JSON) like the deleted hand-written code. Behavior change: a missing client_id / provider is no longer validated client-side — the URL simply omits client_id, matching the Python SDK. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Greptile SummaryReplaces hand-maintained authorization and logout URL builders with generated implementations.
Confidence Score: 3/5The PR is not yet safe to merge because its generated RBI declarations reject valid calls that omit runtime-optional URL-builder keywords, and the previously reported explicit-null serialization issue remains unverified. The runtime authorization builders accept omitted optional keywords, but their RBI declarations still require them, so Sorbet rejects valid calls; available evidence also does not establish that explicit nil values now survive request serialization. Files Needing Attention: rbi/workos/user_management.rbi, rbi/workos/sso.rbi, lib/workos/user_management.rb Important Files Changed
Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile |
# Conflicts: # lib/workos/user_management.rb # rbi/workos/user_management.rbi
Summary
UserManagement#get_authorization_url(H09),UserManagement#get_logout_url, andSSO#get_authorization_url(H14).client_idoverride that falls back to the client's configured value.provider_scopesis joined as CSV andprovider_query_paramsis encoded as JSON, matching the deleted hand-written code.client_id/provideris no longer validated client-side — the URL simply omitsclient_id, matching the Python SDK.WorkOS::OMITsentinel for nullable optional parameters (distinguishes an omitted argument from an explicitnil) and updates the Sorbet RBIs and AuthKit helper tests accordingly.🤖 Generated with Claude Code