-
-
Notifications
You must be signed in to change notification settings - Fork 262
fix: correct resolver configuration merge in ValidationService #1891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: correct resolver configuration merge in ValidationService #1891
Conversation
🦋 Changeset detectedLatest commit: 7f8ad5e 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 |
Changeset has been generated for this PR as part of auto-changeset workflow.Please review the changeset before merging the PR.If you are a maintainer or the author of the PR, you can change the changeset by clicking here Tip If you don't want auto-changeset to run on this PR, you can add the label |
|
Thanks for finding the root cause @Kartikayy007. Could you possibly add a test targeting #1839 so that such scenarios don't happen later? |
ready for another review @Shurtu-gal |
|
@Kartikayy007 What I meant was having a set of asyncapi files with refs between them. That should provide us good sense of security. |
|
|
@Shurtu-gal please review, also please take a look at #1887 whenever you get time |
Shurtu-gal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM



Description
Fixes external file resolution via
$refthat broke in v3.3.0. The issue was caused by incorrect object spread order in theValidationServiceconstructor.Problem:
I believe after PR #1875 adding the custom resolver support, the spread of
parserOptions.__unstable?.resolverwas overwriting the custom resolvers array that was breaking local file reference resolution causing bug.BEFORE (bug):
Solution:
Reordered spreads so base config is spread first, then custom resolvers are set last:
AFTER (fixed):
Testing:
Related issue(s)
Fixes #1839