-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
docs(spec): added name proposal to channel item object #613
Conversation
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide and the instructions about a basic recommended setup 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.
@smoya I know you are now involved in work towards a possible 3.0 that is related to #618 Proposal 618 is pretty solid if it comes to the change from grouping channels by pathname to an actual name, and the current path goes into @fmvilas thoughts? @bali182 what is your take on this one? you created it as |
As far as we ensure names are unique across channels. In #618 comes by default because the name is the key on the |
I started working on it in little chunks #618 (comment) I created several issues on spec repository so anyone can pick it up. |
Can't promise anything, but gonna check it out if I have time. Gonna close this PR. |
@bali182 at least please be involved in review and share your opinion. More different opinions = better features along the way |
title: "Nameable Channel Item Object"
Related issue(s):
#614
This proposal adds an optional name field to the Channel Item Object type. I'm trying to generate WebSocket code using AsyncAPI document. Subscribe and publish operations are nameable/identifiable using operationId, but that's not how sockets work, as a single channel is capable for both. It makes no sense to open a connection for both.
Example:
Let's assume we have the following schema:
This could be translated roughly to something like this in code
As you can see without the
name
field, it's not possible to name whatever concept generated code is using to encapsulate both subscribe and publish. It could bechannelId
too in case it needs to be inline with theoperationId
.