-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Exception is thrown if $ref
value is not a string
#92
Comments
Shani Alaluf Shamah
But no So for now I cannot reproduce exactly your bug, to begin fixing it, on Node.js v16.17.0 and Node.js v18.9.0. Maciej Urbańczyk solution
works - it makes After this change is merged, please comment if exactly your issue was fixed. |
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
Co-authored-by: Maciej Urbańczyk <[email protected]>
User did not provide feedback, assuming issue fixed, resolved and closed. |
Issue is reported by user in
https://asyncapi.slack.com/archives/CQVJXFNQL/p1666700935030749
Shani Alaluf Shamah
We have an issue in bundle version
0.3.4
using parser1.17.1
When adding the feature
referenceIntoComponents: true
we get the following error:
it doesn’t work with
0.3.3
eitherWith
0.2.3
I am getting the following error:I’m using JS,
require
(CJS) syntax:switched to
0.2.3
withbut still getting the
Cannot read property 'startsWith' of undefined
error.Maciej Urbańczyk
https://github.com/asyncapi/bundler/blob/master/src/parser.ts#L44 we should check if
$ref
exists and then check if starts with#
in old code this same https://github.com/Souvikns/bundler/blob/ef574b8620f12c075d89bfc742070748941a45e0/lib/parser.js#L51 😅
Lukasz Gornicki
@shani Alaluf Shamah
ok so mistery solved
imho change is to just extend condition from https://github.com/asyncapi/bundler/blob/master/src/parser.ts#L64, to if (ref && isExternalReference(ref))
Maciej Urbańczyk
we use
isExternalReference
in several places, we should check if$ref
exist insideisExternalReference
function:Lukasz Gornicki
makes sense 👍:skin-tone-2:
The text was updated successfully, but these errors were encountered: