From 6557d78bb5028286f4f47dcc61e7930f4e0c7a93 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:51:56 +0100 Subject: [PATCH] be more precise when matching the json pointer --- src/ruleset/v3/functions/operationMessagesUnambiguity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruleset/v3/functions/operationMessagesUnambiguity.ts b/src/ruleset/v3/functions/operationMessagesUnambiguity.ts index eb8a57a5c..75c1d5206 100644 --- a/src/ruleset/v3/functions/operationMessagesUnambiguity.ts +++ b/src/ruleset/v3/functions/operationMessagesUnambiguity.ts @@ -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)) { + if (!message.$ref.startsWith(`${channelPointer}/messages`)) { results.push({ message: 'Operation message does not belong to the specified channel.', path: [...ctx.path, 'messages', index],