Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions pkg/asyncapi/v3/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ func (msg *Message) mergeWithMessageHeaders(msg2 Message, spec Specification) er
return nil
}

// Follow returns referenced message if specified or the actual message.
// Follow will follow the reference to the end.
func (msg *Message) Follow() *Message {
if msg.ReferenceTo != nil {
return msg.ReferenceTo
return msg.ReferenceTo.Follow()
}
return msg
}
Expand Down
Loading