Skip to content

Conversation

@skrabe
Copy link
Contributor

@skrabe skrabe commented Mar 17, 2025

  • Fixed a bug where a single object incorrectly passed validation against a schema requiring an array. Updated JSONValidation in validation.ts to treat root-level errors as document-wide issues.
  • Fixed a regression where invalid YAML produced validation errors after the root-level error change. Added a check in doValidation to skip validation for unparseable input.
  • Added a test in json-validation.spec.ts to verify that a schema expecting an array correctly rejects a single object, boolean, string and number.

@netlify
Copy link

netlify bot commented Mar 17, 2025

Deploy Preview for codemirror-json-schema ready!

Name Link
🔨 Latest commit dc2ab3d
🔍 Latest deploy log https://app.netlify.com/sites/codemirror-json-schema/deploys/67d7f44eb3ac980008247c62
😎 Deploy Preview https://deploy-preview-151--codemirror-json-schema.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@acao
Copy link
Collaborator

acao commented Apr 20, 2025

looks good to me, thanks @skrabe !

@acao acao merged commit d360a86 into jsonnext:main Apr 20, 2025
4 checks passed
@github-actions github-actions bot mentioned this pull request Apr 20, 2025
acao pushed a commit that referenced this pull request Apr 21, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## codemirror-json-schema@0.8.1

### Patch Changes

- [#151](#151)
[`d360a86`](d360a86)
Thanks [@skrabe](https://github.com/skrabe)! - Fixed validation bugs:
single objects incorrectly passed array schemas, invalid YAML caused
errors after root-level change(now skipped if unparseable), and added
tests ensuring non-array values(object, boolean, string, number) are
correctly rejected.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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