feat: Add Try It Out feature for AsyncAPI documentation#2777
Merged
Lancetnik merged 23 commits intoag2ai:mainfrom Feb 28, 2026
Merged
feat: Add Try It Out feature for AsyncAPI documentation#2777Lancetnik merged 23 commits intoag2ai:mainfrom
Lancetnik merged 23 commits intoag2ai:mainfrom
Conversation
… 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.
…IRoute and test cases
Lancetnik
requested changes
Feb 24, 2026
… updated documentation
…o asyncapi-post-form
- 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.
… Try It Out processing
…rage for various payload types
Shepard2154
reviewed
Feb 28, 2026
Lancetnik
previously approved these changes
Feb 28, 2026
Lancetnik
approved these changes
Feb 28, 2026
Lancetnik
previously approved these changes
Feb 28, 2026
Lancetnik
approved these changes
Feb 28, 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.
Description
Adds a built-in Try It Out feature to the AsyncAPI documentation page hosted via
AsgiFastStream. Users can now publish test messages directly from the browser UI without leaving the docs.When
asyncapi_pathis set, a companionPOSTendpoint is automatically registered at{asyncapi_path}/try. By default it routes messages throughTestBroker(in-memory, no real broker connection required). A toggle in the UI also allows sending to the real broker when needed.The
endpointBaseURL for the UI can be overridden viaAsyncAPI(try_it_out_endpoint_base=...)— useful when pointing the UI at a separate backend or production URL.Type of change
Checklist
just lintshows no errors)just test-coveragejust static-analysis