-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
but this path is not defined in your AsyncAPI file - Caused by trailing slash #713
Comments
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. |
@NaCl5alt sorry for the late reply, do you still wanna work on it |
@Souvikns |
@NaCl5alt we do not assign issues on GitHub. please feel free to open a PR. |
@KhudaDad414 |
🎉 This issue has been resolved in version 0.36.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Overview
Currently, attempts to access the Websocket API, including trailing slashes, result in an error
but this path is not defined in your AsyncAPI file
.I believe that resolving this will make the library easier to use.
Solution
Make the following changes to _extractPathname.
If it looks good, assign me!
glee/src/adapters/ws/server.ts
Lines 183 to 187 in be4a2a6
Append
I was careless.
That you can also set an address in
asyncapi.yaml
that includes a trailing slash.Perhaps we need to remove the trailing slash in the channels method of
@asyncapi/parser
for unification, and also in the tilde method of utils.ts if we want to make it more correct.https://github.com/asyncapi/parser-js/blob/9742b8145020f43db598fe394702fbab5a9c868e/src/models/v3/asyncapi.ts#L61-L67
https://github.com/asyncapi/parser-js/blob/9742b8145020f43db598fe394702fbab5a9c868e/src/utils.ts#L113-L121
If the impact is too large, I would suggest changing the _getChannel method as follows
glee/src/adapters/ws/server.ts
Lines 95 to 98 in be4a2a6
The text was updated successfully, but these errors were encountered: