Skip to content
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

add: support for messageId #461

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions versions/2.0.0/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ Field Name | Type | Description
---|:---:|---
<a name="messageObjectHeaders"></a>headers | [Schema Object](#schemaObject) &#124; [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers.
<a name="messageObjectPayload"></a>payload | `any` | Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject).
<a name="messageObjectMessageId"></a>messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify an message, therefore, it is RECOMMENDED to follow common programming naming conventions.
WaleedAshraf marked this conversation as resolved.
Show resolved Hide resolved
<a name="messageObjectCorrelationId"></a>correlationId | [Correlation ID Object](#correlationIdObject) &#124; [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching.
<a name="messageObjectSchemaFormat"></a>schemaFormat | `string` | A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). Check out the [supported schema formats table](#messageObjectSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#messageObjectSchemaFormatTable).
<a name="messageObjectContentType"></a>contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field.
Expand Down Expand Up @@ -1034,6 +1035,7 @@ Name | Allowed values | Notes
"title": "User signup",
"summary": "Action to sign a user up.",
"description": "A longer description",
"messageId": "UserSignup",
"contentType": "application/json",
"tags": [
{ "name": "user" },
Expand Down Expand Up @@ -1095,6 +1097,7 @@ name: UserSignup
title: User signup
summary: Action to sign a user up.
description: A longer description
messageId: UserSignup
contentType: application/json
tags:
- name: user
Expand Down Expand Up @@ -1140,6 +1143,7 @@ Example using Avro to define the payload:
"title": "User signup",
"summary": "Action to sign a user up.",
"description": "A longer description",
"messageId": "UserSignup",
"tags": [
{ "name": "user" },
{ "name": "signup" },
Expand All @@ -1157,6 +1161,7 @@ name: UserSignup
title: User signup
summary: Action to sign a user up.
description: A longer description
messageId: UserSignup
tags:
- name: user
- name: signup
Expand All @@ -1183,6 +1188,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje
Field Name | Type | Description
---|:---:|---
<a name="messageTraitObjectHeaders"></a>headers | [Schema Object](#schemaObject) &#124; [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers.
<a name="messageTraitObjectMessageId"></a>messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify an message, therefore, it is RECOMMENDED to follow common programming naming conventions.
<a name="messageTraitObjectCorrelationId"></a>correlationId | [Correlation ID Object](#correlationIdObject) &#124; [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching.
<a name="messageTraitObjectSchemaFormat"></a>schemaFormat | `string` | A string containing the name of the schema format/language used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject).
<a name="messageTraitObjectContentType"></a>contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field.
Expand Down
6 changes: 6 additions & 0 deletions versions/2.0.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,9 @@
]
},
"payload": {},
"messageId": {
"type": "string"
},
"correlationId": {
"oneOf": [
{
Expand Down Expand Up @@ -870,6 +873,9 @@
}
]
},
"messageId": {
"type": "string"
},
"correlationId": {
"oneOf": [
{
Expand Down