pub struct Message {Show 13 fields
pub headers: Option<RefOr<Either<Schema, MultiFormatSchema>>>,
pub payload: Option<RefOr<Either<Schema, MultiFormatSchema>>>,
pub correlation_id: Option<RefOr<CorrelationId>>,
pub content_type: Option<String>,
pub name: Option<String>,
pub title: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub tags: Vec<Tag>,
pub external_docs: Option<RefOr<ExternalDocumentation>>,
pub bindings: Option<RefOr<MessageBindings>>,
pub examples: Vec<MessageExample>,
pub traits: Vec<RefOr<MessageTrait>>,
}Expand description
Describes a message received on a given channel and operation.
Fields§
§headers: Option<RefOr<Either<Schema, MultiFormatSchema>>>Schema definition of the application headers. Schema MUST be a map of key-value pairs. It MUST NOT define the protocol headers. If this is a Schema Object, then the schemaFormat will be assumed to be “application/vnd.aai.asyncapi+json;version=asyncapi” where the version is equal to the AsyncAPI Version String.
payload: Option<RefOr<Either<Schema, MultiFormatSchema>>>Definition of the message payload. If this is a Schema Object, then the schemaFormat will be assumed to be “application/vnd.aai.asyncapi+json;version=asyncapi” where the version is equal to the AsyncAPI Version String.
correlation_id: Option<RefOr<CorrelationId>>Definition of the correlation ID used for message tracing or matching.
content_type: Option<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 field.
name: Option<String>A machine-friendly name for the message.
title: Option<String>A human-friendly title for the message.
summary: Option<String>A short summary of what the message is about.
description: Option<String>A verbose explanation of the message. CommonMark syntax can be used for rich text representation.
A list of tags for logical grouping and categorization of messages.
external_docs: Option<RefOr<ExternalDocumentation>>Additional external documentation for this message.
bindings: Option<RefOr<MessageBindings>>A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message.
examples: Vec<MessageExample>List of examples.
traits: Vec<RefOr<MessageTrait>>A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.