docs: fix security callbacks documentation for single vs multiple schemes #86
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.
Summary
Fixes the security callbacks documentation to correctly distinguish between single and multiple security scheme patterns. Previously, the documentation incorrectly showed the
securitycallback pattern (returning aSecurityobject) for single security schemes.The key distinction:
bearerAuth) with a callback returning the credential stringsecurityproperty with a callback returning aSecurityobject to dynamically choose which auth method to useUpdates since last revision
Scaled back changes per user feedback - only TypeScript examples were updated. All other language examples (Python, Go, Java, C#, PHP, Ruby) were reverted to their original state since the user only provided TypeScript-specific feedback.
Review & Testing Checklist for Human
bearerAuth: async (): Promise<string> => { ... }is the correct pattern for single security schemessecurity: async (): Promise<Security> => { ... }is the correct pattern for multiple security schemessecurity/securitySourceeven for single schemes). If the single-scheme pattern applies to other languages too, those examples may need separate updates.Recommended test plan: Generate a TypeScript SDK with a single security scheme and verify the documented
bearerAuthcallback pattern works as shown.Notes