-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
Shouldn't we remove messageId
in v3?
#978
Comments
I stand pretty firm not to alter v3 at all. |
Let's take the opportunity and remove it now. Otherwise, we would have to deprecate it and carry it until v4. I say not to complicate our lives in v3 with |
@jonaslagoni @smoya can you folks confirm how complicated will that be (removal of Spec says below, and it is in case of There is one problem if we remove |
Considering the following doc: asyncapi: '3.0.0'
info:
title: Test
version: 1.0.0
channels:
userSignedUp:
address: 'user/signedup'
messages:
one:
$ref: '#/components/messages/userSignedUp'
two:
$ref: '#/components/messages/userSignedUpWithExpandedData'
components:
messages:
userSignedUp:
messageId: userSignedUp
payload:
type: object
properties:
username:
type: string
userSignedUpWithExpandedData:
messageId: detailedUserSignedUp
payload:
type: object
properties:
username:
type: string
address:
type: string
phone:
type: number Prior to removing
I don't think it is hard. However, this is the current logic: id(): string {
return this.messageId() || this._meta.id || this.extensions().get(xParserMessageName)?.value<string>() as string;
} Note that |
Just another breaking changes, which of course will cause break stuff here and there 😄 |
This double Also, the point I would like to highlight, that Operation Object doesn't have a |
Following Sergio's example: asyncapi: '3.0.0'
info:
title: Test
version: 1.0.0
channels:
userSignedUp:
address: 'user/signedup'
messages:
one:
$ref: '#/components/messages/userSignedUp'
two:
$ref: '#/components/messages/userSignedUpWithExpandedData'
components:
messages:
userSignedUp:
messageId: userSignedUp
payload:
type: object
properties:
username:
type: string
userSignedUpWithExpandedData:
messageId: detailedUserSignedUp
payload:
type: object
properties:
username:
type: string
address:
type: string
phone:
type: number Just want to remark that being able to set the message ID in place by And also would love to remind that for code generation purposes, we have the So yeah, I'm all in for removing |
BTW, I'm picking up this issue and I commit to have it done by next week. |
PR for the spec: #984. Will follow up with PRs for parser-js and JSON Schemas. |
So here's the full list of PRs:
|
Added the PR to fix the converter to the list above. |
I'm closing this issue as it's been addressed already. Thanks for the fast reviews and support 🙏 |
Eh, I missed this conversation. messageId was really useful for tooling. It was added here: asyncapi/parser-js#414 The main difference between |
So in v3 under channel you need to provide a list of
messages
ad s key/value, where key is uniquemessageId
What is the use case for still having
messageId
in a Message Object then?From current description,
messageId
on Message Object level is toUnique string used to identify the message
so like it was before v3. But when I'm sharing messages across documents, I think better to treat key of the message under channel messages as unique identifier.wdyt?
cc @dalelane that reviewed #827 with me
cc @fmvilas as contributor
cc @jonaslagoni as release coordinator
The text was updated successfully, but these errors were encountered: