CADE-2516 Repoint high-level tokenInfo to renamed get-access-token-context op - #506
Merged
Merged
Conversation
…ntext op The api-specification spec renamed the OAuth token-context operation from `token-info` to `get-access-token-context` (and its schema from `TokenInformation` to `TokenContext`) so the ReadMe reference page slug matches the original /reference/get-access-token-context URL. That removed the generated `tokenInfo` method and `TokenInformation` low-level model the high-level generator depends on, so `yarn build` crashed in highlevelModelGenerator (MiroApi.prototype['tokenInfo'] is undefined) - which is why the api-specification publish_public_repo job started failing. Repoint the high-level model config to the new names while keeping the public SDK surface unchanged: - method -> getAccessTokenContext (the new low-level method) - alias -> tokenInfo (so api.tokenInfo() still works) - model extends the regenerated TokenContext, still exported as TokenInformation So `api.tokenInfo(): Promise<TokenInformation>` is unchanged for SDK users; only its wiring to the generated client changes. The full client regeneration lands via the automated publish_public_repo upgrade PR once this is on main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Coverage report for commit: cc5bca8 Summary - Lines: 72.32% | Methods: 73.66% | Branches: 48.66%🤖 comment via lucassabreu/comment-coverage-clover |
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.
What & why
The
api-specificationspec renamed the OAuth token-context operation fromtoken-infotoget-access-token-context(and its schemaTokenInformation→TokenContext) so the ReadMe reference page slug matches the original/reference/get-access-token-contextURL (see api-specification #402, CADE-2516).That removed the generated
tokenInfomethod andTokenInformationlow-level model the high-level generator depends on, soyarn buildcrashed inhighlevelModelGenerator(MiroApi.prototype['tokenInfo']isundefined). This is why theapi-specificationpublish_public_repojob started failing.Change
Repoint the high-level model config (
packages/generator/modelDefinition.ts) to the new names while keeping the public SDK surface unchanged:method→getAccessTokenContext(the new low-level method)alias→tokenInfo(soapi.tokenInfo()still works for SDK users)TokenInformationclass is preserved, now extending the generatedTokenContextapi.tokenInfo(): Promise<TokenInformation>is therefore unchanged for consumers — only its internal wiring to the generated client changes.Scope
This is the only hand-written source change needed. The full client regeneration (low-level
api/,model/,highlevel/index.ts,spec.json) lands automatically via thepublish_public_repoupgrade PR once this is onmainand the job is re-run.Verification
yarn workspace generator testpasses.yarn buildlocally against the newspec.json+ this config: the Node high-level generator no longer crashes and emitstokenInfo()callingthis._api.getAccessTokenContext().