refactor: fix the file path for the import of websocket client in node example.js#1397
Conversation
|
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.
WalkthroughThe change updates the import statement for the WSClient module in the JavaScript example. The import path has been modified by removing the Changes
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@derberg Please provide feedback and provide details for something else to be changed or reversed if needed. |
derberg
left a comment
There was a problem hiding this comment.
thanks a lot
before I merge can you please update the PR title.
look into https://github.com/asyncapi/generator/blob/master/CONTRIBUTING.md#pull-requests and https://github.com/asyncapi/generator/blob/master/CONTRIBUTING.md#conventional-commits
@derberg Updated the PR title. Thanks for the guidance. |
example.js
|
awesome, made one more tiny fix |
|
|
/rtm |



Describe the bug.
As per describe in the ReadME we can start example script that uses a client library generated by the test: node example.js
But the command is throwing an error.
Expected behavior
The command should start example script that uses a client library generated by the test.
Before & After
Before:-

When trying to run " node example.js " in the websocket folder, it was giving an error:-
After:-

The error was caused because of an incorrect file path.
The error was fixed by making sure that the websocket client is imported from the correct folder with the correct file path.
Description:-
This PR fixes the websocket bug in issue #1396 caused by incorrect file path.
How to test
Run the project locally
Navigate to the websocket folder
Run " node example.js " to start a websocket server
Checklist:-
All tests in the websocket folder using " npm run test " are passed with no errors or warnings.
Summary by CodeRabbit