Skip to content

Commit

Permalink
fix: update operationMessagesUnambiguity rule validity check (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamil1094 authored Dec 4, 2024
1 parent c9e2d3f commit ebf856e
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 ebf856e

Please sign in to comment.