Skip to content

Commit

Permalink
fix: update operationMessagesUnambiguity rule validity check
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil1094 committed Jul 9, 2024
1 parent d6ed4ac commit c097cdf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const operationMessagesUnambiguity = createRulesetFunction<{ channel?: {'
const channelPointer = targetVal.channel?.$ref as string; // required

targetVal.messages?.forEach((message, index) => {
if (!message.$ref.startsWith(`${channelPointer}/messages`)) {
if (message.$ref && !message.$ref.startsWith(`${channelPointer}/messages`)) {
results.push({
message: 'Operation message does not belong to the specified channel.',
path: [...ctx.path, 'messages', index],
Expand Down

0 comments on commit c097cdf

Please sign in to comment.