fix: Bug: AsyncAPI documentation fails when Confluent uses oauth bearer authentication#2775
Merged
Lancetnik merged 1 commit intoag2ai:mainfrom Feb 19, 2026
Merged
Conversation
…er authentication Fixes ag2ai#2774
|
|
Lancetnik
approved these changes
Feb 19, 2026
Member
|
Thank you! |
vvlrff
added a commit
to vvlrff/faststream
that referenced
this pull request
Feb 21, 2026
… registration (ag2ai#2775) - Enhanced AsyncAPI documentation to include a Try It Out feature, allowing users to publish test messages directly from the browser UI. - Registered a POST endpoint at `{asyncapi_path}/try` for publishing messages in test mode. - Updated `AsgiFastStream` to accept a `try_it_out` parameter for enabling/disabling the feature. - Implemented `TryItOutProcessor` to handle message publishing and validation. - Added tests to verify the functionality of the Try It Out feature, including endpoint registration and message delivery.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 28, 2026
* feat: Add Try It Out feature for AsyncAPI documentation with endpoint registration (#2775) - Enhanced AsyncAPI documentation to include a Try It Out feature, allowing users to publish test messages directly from the browser UI. - Registered a POST endpoint at `{asyncapi_path}/try` for publishing messages in test mode. - Updated `AsgiFastStream` to accept a `try_it_out` parameter for enabling/disabling the feature. - Implemented `TryItOutProcessor` to handle message publishing and validation. - Added tests to verify the functionality of the Try It Out feature, including endpoint registration and message delivery. * style: Refactor code for better readability and formatting in AsyncAPIRoute and test cases * refactor: polish PR * tests: fix result validation * feat: Enhance Try It Out feature with structured message handling and updated documentation * style: Improve code formatting for message structure in AsyncAPI test cases * feat: return just a result * feat: Add asyncapi_js_react_url parameter to AsyncAPI functions - Introduced asyncapi_js_react_url parameter in make_asyncapi_asgi, AsyncAPIRoute, and get_asyncapi_html functions to support React-based rendering. - Updated logic to utilize asyncapi_js_react_url when the Try It Out feature is enabled, enhancing flexibility in AsyncAPI documentation rendering. * refactor: Simplify asyncapi_js_url assignment logic in get_asyncapi_html function * feat: Enhance AsyncAPI functionality with new parameters and improved Try It Out processing * fix: Update TryItOutProcessor to use set for empty check in JSONResponse * fix: Refine TryItOutProcessor response handling and enhance test coverage for various payload types * chore: bump version * docs: fix markup * docs: move TryItOut to AsyncAPI docs * refactor: use standalone TryItOut plugin * refactor: use unpkg AsyncAPI CDN * lint: apply changes --------- Co-authored-by: Nikita Pastukhov <diementros@yandex.ru> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru>
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.
Fixes #2774
Description
This fixes a FastStream AsyncAPI schema generation bug for SASLOAuthBearer where securitySchemes.oauthbearer was emitted as {"type":"oauth2","$ref":""}.
An empty $ref is invalid and causes AsyncAPI React to attempt file resolution (readFile), leading to a runtime docs error.
Fixes #2774
Type of change
Please delete options that are not relevant.
Checklist
just lintshows no errors)just test-coveragejust static-analysis