-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
message.messageId is not a function #385
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. |
We are blocked by this issue. I am hoping to get fixes for this issue soon, so we can procedd further. |
i encountered same issue |
@remcocats Do we know when PR can be approved? |
Hey @jonaslagoni , Can you please suggest why I am getting this issue in Ubantatu system and not in alpine or windows system? It was working fine earlier and suddenly it's start to fail. We are really clueless for this issue. It will be great if you can give us some insight on this. We are blocked due to this issue. |
Describe the bug
When using the template with older version of the api contract I get the fault message.messageId is not a function.
when I look in de message.js I see the problem:
// check typeof as fallback for older version than
2.4.0`const messageId = typeof message.messageId === 'function' && message.messageId();
const headers = message.headers();
const payload = message.payload();
const correlationId = message.correlationId();
const contentType = message.contentType();
const externalDocs = message.externalDocs();
const showInfoList = contentType || externalDocs;
let header = 'Message';
if (message.title()) {
header +=
${message.title()}
;}
const id = message.messageId() || message.name() || message.id();
if (id) {
header +=
\
${id}`; }
When the const id is set the function message.messageId() is called this has to be messageId.
The text was updated successfully, but these errors were encountered: