-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
When the parser is unable to resolve a path, give the user supplied path in the error. #75
When the parser is unable to resolve a path, give the user supplied path in the error. #75
Conversation
…ath in the error.
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.
Thanks for the PR! I just have one question/change request.
* @returns {Pointer} | ||
*/ | ||
$Ref.prototype.resolve = function (path, options) { | ||
var pointer = new Pointer(this, path); | ||
$Ref.prototype.resolve = function (path, options, originalPath) { |
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.
I don't see anywhere where this method is called with the new parameter. Am I missing something? Or is the parameter always undefined
? If the latter, then we can remove the parameter from here and from the Pointer
constructor.
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.
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.
thanks. Not sure how I missed that
json-schema-ref-parser v5.0.0 has been published to npm and includes this fix. Thanks again for your help! |
Does this also fix the issue with the custom resolver not getting the original $ref? (i'll test when i get a chance) |
This is an attempt to fix APIDevTools/swagger-parser#76.
I'm a little out of my depth here but as far as I can tell this change should work in all-cases.