java.lang.Object
io.github.springwolf.asyncapi.v3.model.channel.message.MessageReference
All Implemented Interfaces:
Message, Reference

public class MessageReference extends Object implements Message, Reference
  • Constructor Details

    • MessageReference

      public MessageReference()
  • Method Details

    • getRef

      public String getRef()
      Description copied from interface: Reference
      Required. The reference string.
      Specified by:
      getRef in interface Reference
    • toComponentMessage

      public static MessageReference toComponentMessage(MessageObject message)
      Convenient Builder to create a Message reference to an existing Message
      Parameters:
      message - Message to create the reference to. This Message MUST have a 'messageId' field
      Returns:
      a Message with the 'ref' field pointing to "#/components/messages/{messageId}"
    • toComponentMessage

      public static MessageReference toComponentMessage(String messageId)
    • toChannelMessage

      public static MessageReference toChannelMessage(String channelId, MessageObject message)
    • toChannelMessage

      public static MessageReference toChannelMessage(String channelId, String messageId)
    • toSchema

      public static MessageReference toSchema(String schemaName)
    • extractRefName

      public static String extractRefName(String ref)