feat: add query parameter support to JavaScript WebSocket client template#1969
feat: add query parameter support to JavaScript WebSocket client template#1969hameedkhan-12 wants to merge 2 commits intoasyncapi:masterfrom
Conversation
…late - Extract query parameters from AsyncAPI channel bindings - Update Constructor component to accept dynamic query parameter arguments - Build URL query string using URLSearchParams for proper encoding - Add comprehensive unit tests with 100% code coverage - Update integration test snapshots Closes asyncapi#1957
🦋 Changeset detectedLatest commit: 127a10d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
📝 WalkthroughWalkthroughThe pull request adds query parameter support to the JavaScript WebSocket client template by extracting parameters from AsyncAPI channel bindings, dynamically generating constructor signatures and JSDoc documentation, and conditionally appending query parameters to the WebSocket URL using URLSearchParams. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Please have a look at it -> #1957 (comment) |



Description:
This PR adds support for dynamic query parameters in the JavaScript WebSocket client template.
It allows developers to pass query parameters when creating a WebSocket client which are then properly encoded into the URL.
This ensures compatibility with AsyncAPI channel bindings that require query parameters and improves flexibility for client initialization.
Changes include:
-Extract query parameters from AsyncAPI channel bindings
-Update constructor to accept dynamic query parameter arguments
-Build URL query string using URLSearchParams for proper encoding
-Add comprehensive unit tests with 100% code coverage
-Update integration test snapshots
Closes #1957
Summary by CodeRabbit
Release Notes
New Features
Tests