Skip to content

Commit

Permalink
add: support for messageId
Browse files Browse the repository at this point in the history
  • Loading branch information
WaleedAshraf committed Nov 11, 2020
1 parent 94baeb8 commit ba0c670
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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.
<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

0 comments on commit ba0c670

Please sign in to comment.