From bb086fe5159a419b0acfd7191b7c6f2a2d749f23 Mon Sep 17 00:00:00 2001 From: Matt Apperson Date: Wed, 11 Nov 2026 14:46:06 -0500 Subject: [PATCH] feat!: rename client.o_auth to client.oauth and Scim to SCIM Adds an overlay that groups the OAuth operations under `oauth`, and customCasings entries so generated class names use OAuth and SCIM. Sets the next version to 1.4.0 because the renames are breaking. Closes #587 --- .speakeasy/gen.yaml | 6 +++++- .speakeasy/overlays/oauth-group.overlay.yaml | 19 +++++++++++++++++++ .speakeasy/workflow.yaml | 1 + examples/oauth_pkce_example.py | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .speakeasy/overlays/oauth-group.overlay.yaml diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fe32d7001..dbfb4e41f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -37,7 +37,7 @@ generation: documentation: mintlify preApplyUnionDiscriminators: true python: - version: 1.3.161 + version: 1.4.0 additionalDependencies: dev: pytest: '>=8.3' @@ -60,6 +60,10 @@ python: customCasings: byok: initialism: true + oauth: + pascal: OAuth + scim: + initialism: true stt: initialism: true tts: diff --git a/.speakeasy/overlays/oauth-group.overlay.yaml b/.speakeasy/overlays/oauth-group.overlay.yaml new file mode 100644 index 000000000..fd451039c --- /dev/null +++ b/.speakeasy/overlays/oauth-group.overlay.yaml @@ -0,0 +1,19 @@ +overlay: 1.0.0 +x-speakeasy-jsonpath: rfc9535 +info: + title: Expose the OAuth operations as `oauth` rather than `o_auth` + version: 0.0.0 +actions: + # The `OAuth` tag splits on its internal capital, so the SDK attribute came out + # as `client.o_auth`. An explicit group names it `oauth`; the `oauth` entry in + # gen.yaml's customCasings keeps the class name `OAuth`. + - target: $.paths.*[?@.tags[?@ == 'OAuth']] + description: Group every operation tagged OAuth under `oauth` + update: + x-speakeasy-group: oauth + # The group's description comes from a tag of the same name, so rename the + # tag definition too; otherwise the class and docs page lose their summary. + - target: $.tags[?@.name == 'OAuth'] + description: Rename the OAuth tag definition to match the group + update: + name: oauth diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index d75138f04..57482d56c 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -13,6 +13,7 @@ sources: - location: .speakeasy/overlays/fix-nullable-pagination.overlay.yaml - location: .speakeasy/overlays/deprecated-beta-responses-alias.overlay.yaml - location: .speakeasy/overlays/intern-chat-json-response.overlay.yaml + - location: .speakeasy/overlays/oauth-group.overlay.yaml output: .speakeasy/out.openapi.yaml registry: location: registry.speakeasyapi.dev/openrouter/sdk/open-router-chat-completions-api diff --git a/examples/oauth_pkce_example.py b/examples/oauth_pkce_example.py index e07e3e3fe..352f9cf46 100644 --- a/examples/oauth_pkce_example.py +++ b/examples/oauth_pkce_example.py @@ -55,7 +55,7 @@ def main(): # Step 4: After authorization, the callback URL receives an authorization code # Step 5: Exchange the code for an API key using the SDK's exchange method # code = "authorization-code-from-callback" - # api_key_response = client.o_auth.exchange_auth_code_for_api_key( + # api_key_response = client.oauth.exchange_auth_code_for_api_key( # code=code, # code_verifier=result.code_verifier, # code_challenge_method="S256",