Skip to content

Commit

Permalink
be more precise when matching the json pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya committed Nov 27, 2023
1 parent fe1cb8d commit 6557d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ruleset/v3/functions/operationMessagesUnambiguity.ts
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)) {
if (!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 6557d78

Please sign in to comment.