Skip to content

fix(bundler): only skip v3 reference object slots when dereferencing - #2351

Open
rishabhknowss wants to merge 1 commit into
asyncapi:masterfrom
rishabhknowss:fix/bundler-v3-excluded-paths
Open

rishabhknowss wants to merge 1 commit into
asyncapi:masterfrom
rishabhknowss:fix/bundler-v3-excluded-paths

Conversation

@rishabhknowss

Copy link
Copy Markdown

fixes #2347

what

  • the v3 excludedPathMatcher used unanchored patterns like /#\/channels\/.*\/servers/, so any pointer under a channel or operation containing /servers, /channel or /messages was skipped. a payload property named servers or serversCount, or an http binding query property named channel, kept its external $ref and the bundle wasn't self-contained.
  • the patterns are now anchored to the slots themselves: channels.<id>.servers and operations.<id>[.reply].channel|messages, plus the components variants. ref-parser checks every key path before descending, so excluding the slot also skips its items.
  • orderPropsAccToAsyncAPISpec copied root props only when truthy, dropping x-internal: false and x-retries: 0. it now checks prop in.

testing

  • new fixture tests/v3-schema-props from the issue's repro, plus a local servers ref and an operation messages ref to check the real slots are still left alone.
  • the new test fails on master for each half on its own (falsy extensions missing; servers/serversCount/channel still $ref).
  • npx jest in packages/bundler: 11/11 pass. tsc --noEmit clean.
  • the bundled fixture parses with @asyncapi/parser with no errors (previously invalid-ref).

🤖 Generated with Claude Code

The v3 excludedPathMatcher used unanchored patterns, so a schema property
named servers, channel or messages kept its external $ref and the bundle
was not self-contained. Root extensions with falsy values were dropped.

Fixes asyncapi#2347
@changeset-bot

changeset-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c77e58d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/bundler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

[BUG] bundler: v3 schema properties matching servers/channel/messages are not dereferenced; falsy root x- extensions are dropped

1 participant