diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 365ad9cd1..a2b7924a5 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1016,7 +1016,7 @@ Field Name | Type | Description tags | [Tags Object](#tagsObject) | A list of tags for API documentation control. Tags can be used for logical grouping of messages. externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this message. bindings | [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message. -examples | [Map[`string`, `any`]] | An array of key/value pairs where keys MUST be either **headers** and/or **payload**. Values MUST contain examples that validate against the [headers](#messageObjectHeaders) or [payload](#messageObjectPayload) fields, respectively. +examples | [Map[`string`, `any`]] | An array of key/value pairs where keys MUST be either **headers** and/or **payload**. Values MUST contain examples that validate against the [headers](#messageObjectHeaders) or [payload](#messageObjectPayload) fields, respectively. Example MAY also have the **name** and **summary** additional keys to provide respectively a machine-friendly name and a short summary of what the example is about. traits | [[Message Trait Object](#messageTraitObject) | [Reference Object](#referenceObject)] | A list of traits to apply to the message object. Traits MUST be merged into the message object using the [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) algorithm in the same order they are defined here. The resulting object MUST be a valid [Message Object](#messageObject). This object can be extended with [Specification Extensions](#specificationExtensions). @@ -1086,6 +1086,8 @@ Name | Allowed values | Notes ], "examples": [ { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", "headers": { "correlationId": "my-correlation-id", "applicationInstanceId": "myInstanceId" @@ -1135,7 +1137,9 @@ correlationId: traits: - $ref: "#/components/messageTraits/commonHeaders" examples: - - headers: + - name: SimpleSignup + summary: A simple UserSignup example message + headers: correlationId: my-correlation-id applicationInstanceId: myInstanceId payload: