fix(bundle): don't look for a $ref pointer on a null value#393
Merged
jonluca merged 1 commit intoAPIDevTools:mainfrom Jul 15, 2025
Merged
fix(bundle): don't look for a $ref pointer on a null value#393jonluca merged 1 commit intoAPIDevTools:mainfrom
$ref pointer on a null value#393jonluca merged 1 commit intoAPIDevTools:mainfrom
Conversation
Collaborator
|
LGTM - thanks! |
Pull Request Test Coverage Report for Build 16305772887Details
💛 - Coveralls |
|
🎉 This PR is included in version 14.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This was referenced Jul 16, 2025
erunion
added a commit
to readmeio/oas
that referenced
this pull request
Jul 16, 2025
## 🧰 Changes This upgrade `@apidevtools/json-schema-ref-parser` to the latest release and also adds a test for the problem that was surfaced in readmeio/rdme#1306 and fixed in APIDevTools/json-schema-ref-parser#393. Since this upgrade had to be reverted earlier today due to it being released in a patch release, which was automatically pulled down to all existing rdme versions, since this is a major version bump of `json-schema-ref-parser` I'll do a major version bump of our parser library too. Better safe than sorry.
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.
We had some customers of our CLI tool report issues1 this morning of sudden crashes when attempting to validate an OpenAPI definition after we published a new release of our OpenAPI parser1 that included an upgrade from v13.0.5 to v14.1.0 with the following error:
We were able to narrow it down to a regression introduced in #391 where it looks for a
$refpointer to supply to theonBundlecallback. The problem our customers had, and we were able to reproduce, encountered with this was on nullish schema examples and this work attempting to look for a$refpointer in it:The fix I've submitted here is to just wrap this check in a type assertion to ensure that we're only looking for a
$refpointer in an object.Footnotes
https://github.com/readmeio/rdme/issues/1306 ↩ ↩2