fix(parser): trigger custom parsers on operation.channel.messages.*.payload#1177
Open
q404365631 wants to merge 1 commit into
Open
fix(parser): trigger custom parsers on operation.channel.messages.*.payload#1177q404365631 wants to merge 1 commit into
q404365631 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: a7d6da9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Adds four new JSONPath entries to
customSchemasPathsV3so custom schema parsersalso fire on payloads/headers reached via
operation.channel.messages(when thechannel is
$ref'd to an external file).Why
As reported in #1099, when an AsyncAPI 3.0 document defines an operation like:
... and the referenced channel defines a
messages.AMessage.payloadwith a customschemaFormat, the custom parser is never invoked becausecustomSchemasPathsV3did not include$.operations.*.channel.messages.*.payload(it covered
$.operations.*.messages.*.payloadbut not thechannel.intermediatelevel). The user-reported workaround (re-declaring the channel under root
channels:) confirmed the path mismatch.Changes
packages/parser/src/custom-operations/parse-schema.ts: Added 4 paths tocustomSchemasPathsV3:$.operations.*.channel.messages.*.payload$.operations.*.channel.messages.*.headers$.components.operations.*.channel.messages.*.payload$.components.operations.*.channel.messages.*.headersPlus a changeset for
@asyncapi/parser(patch).2 files changed, 17 insertions(+).
Fixes #1099