chore(gen): render OAuth/SCIM as initialisms, keeping o_auth as a deprecated alias - #588
Open
rajarshidattapy wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Body
Fixes #587.
Problem
PR #561 normalized
BYOK/STT/TTSviacustomCasingsand left two initialisms behind.The user-facing one is OAuth: the tag
OAuthis mixed-case, so thesnake_caseattribute splitson the internal capital and the namespace is
client.o_auth, notclient.oauth— while thegenerated docs directory is
docs/sdks/oauth/.Scimis the other: its class name never gotthe initialism treatment that
BYOK,STT,TTS, andAPIKeyshave.Change
Both entries use the same proven
initialism: trueform #561 introduced.client.o_authhas been the only public name for these operations sincev1.0, so the renameis paired with a deprecated alias rather than shipped bare — a regen would otherwise break
every caller with no migration path. The overlay adds
o_authas a second tag on both OAuthoperations, mirroring
deprecated-beta-responses-alias.overlay.yamlline for line, includingits note about defining the tag in the overlay so a monorepo sync can't silently drop it.
The two halves have very different blast radii
Worth knowing before merging, since
initialism: truerenders the token in all-capseverywhere it appears — that is why #561 produced
BYOKKey,STTRequest,STTInputAudio:oauthtouches exactly one symbol. Greppingsrc/forOAuth-containing symbols returnsa single hit, the
OAuthclass. So this fixes the attribute and renames one class.scimtouches six.Scim, plusScimGroup,ScimGroupMapping,ScimGroupMappingRole,ScimGroupMappingTypedDict,ScimGroupTypedDict, and 3 docs pages.The
scimattribute is already correct, so unlike OAuth there is no ergonomics win — it iscosmetic class-name consistency bought with six renamed public component classes. It is
included because #587 asks for it, but it is three lines to drop from
gen.yamland the OAuthhalf stands alone. Happy to split it out if you'd prefer.
Verification
The Speakeasy CLI isn't available in my environment, so I verified the config and spec directly:
customCasingsis exactly{byok, oauth, scim, stt, tts}, all usinginitialism: truein.openapi.yaml(tags['OAuth'], no pre-existingo_authtag), so the overlay cannot silently no-op
out.openapi.yamlboth operations now carry['OAuth', 'o_auth'], the alias tag ispresent and
deprecated: truewith the sunset notice, the canonicalOAuthtag isunchanged, and no other operation picked up the alias
src/is intentionally unchangedThe rename only materializes on regeneration. Two things to confirm on the regen PR, since I
could not:
client.oauth, withclient.o_authstill present and marked deprecatedBYOK/STTprecedent points toOAUTH, which isconsistent with the other initialisms but is not the canonical spelling of
OAuth. If you wantOAuthpreserved on the class while the attribute becomesoauth, that needs a differentcustomCasingsknob than the one chore(gen): render BYOK/TTS/STT as initialisms in generated symbols #561 established, and I could not find its schema in thepublic docs.