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

Enforce array schema #151

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skrabe
Copy link

@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.

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.

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.

1 participant