docs: fix security callbacks documentation for single vs multiple schemes#86
Closed
devin-ai-integration[bot] wants to merge 2 commits into
Closed
docs: fix security callbacks documentation for single vs multiple schemes#86devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…emes Co-Authored-By: ash@speakeasyapi.dev <ash@speakeasyapi.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
🔗 Preview your changes |
Co-Authored-By: ash@speakeasyapi.dev <ash@speakeasyapi.dev>
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.
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