docs: fix incorrect model typedefs (AuthorizationCodeData / ClientData)#443
Merged
Merged
Conversation
The AuthorizationCodeData typedef documented the code-string property as
`code`, but getAuthorizationCode()/saveAuthorizationCode() and the library
itself use `authorizationCode` (see authorize-handler and
authorization-code-grant-type, which read `code.authorizationCode`). Rename
the property to match reality and the other token typedefs.
ClientData.id also carried a copy-pasted description ("The authorization
code passed to getAuthorizationCode()"); correct it to describe the client
id.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Several committed API docs had drifted from their JSDoc source — their output no longer matched `npm run docs:api`. Regenerate authorize-handler, pkce, server and authorization-code-grant-type so the committed docs match the source again. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jankapunkt
reviewed
Jun 16, 2026
jankapunkt
approved these changes
Jun 16, 2026
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
Documentation fixes found while investigating #409.
Closes #409.
Changes
1. Correct two model typedef descriptions (
docs: fix incorrect AuthorizationCodeData and ClientData typedefs)AuthorizationCodeDatadocumented the code-string property ascode, butgetAuthorizationCode()returns /saveAuthorizationCode()acceptsauthorizationCode, and the library readscode.authorizationCodeeverywhere it touches it (authorize-handler.js,authorization-code-grant-type.js). Renamedcode→authorizationCodeto match reality and the siblingAccessTokenData/RefreshTokenDatatypedefs. Thanks @omusil24 for the report.ClientData.idcarried a copy-pasted description ("The authorization code passed togetAuthorizationCode()"); corrected to "A unique string identifying the client".This is documentation-only: the library reads
code.authorizationCodeexclusively and never readscode.code, so no runtime change or backward-compat shim is required.2. Regenerate drifted API docs (
docs: regenerate API docs to match current JSDoc)While regenerating
model.mdI found several committed API docs no longer matchednpm run docs:api(their JSDoc had been changed without regenerating):authorize-handler,pkce,server,authorization-code-grant-type. Regenerated so the committed docs match source again.Notes
npm run lintpasses.docs:api+git diff --exit-code docs/api) to stop this drift recurring — happy to add in a follow-up if useful.🤖 Generated with Claude Code