Skip to content
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

refactor: throw error for invalid $refs #108

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

darrenyong
Copy link

@darrenyong darrenyong commented Oct 24, 2023

🚥 Resolves ISSUE_ID

🧰 Changes

Follow up from #102

  • Was referencing the wrong key in one of the objects.
  • Added a check for the continueOnErrors option

🧬 QA & Testing

Provide as much information as you can on how to test what you've done.

@@ -16,7 +16,7 @@ describe('Schema with invalid pointers', function () {
helper.shouldNotGetCalled();
} catch (err) {
expect(err).to.be.an.instanceOf(InvalidPointerError);
expect(err.message).to.contain('Invalid $ref pointer "f". Pointers must begin with "#/"');
expect(err.message).to.contain('Invalid $ref pointer "./invalid.json#f". Pointers must begin with "#/"');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These types of refs are caught earlier now so it gives a more descriptive path on the invalid pointer.

@darrenyong
Copy link
Author

just realized I never requested a re-review

@erunion erunion merged commit 098e05e into main Dec 15, 2023
10 of 18 checks passed
@erunion erunion deleted the refactor/throw-error-for-invalid- branch December 15, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants