jsonnext / codemirror-json-schema

A JSONSchema enabled mode for codemirror 6, for json4 and json5, inspired by monaco-json
https://codemirror-json-schema.netlify.app
MIT License
56 stars 9 forks source link

Handle generic validation error #103

Closed imolorhe closed 1 month ago

imolorhe commented 1 month ago

Currently we don't return validation errors when we don't have valid corresponding pointers. However we wouldn't always have valid pointers e.g. if the data isn't a valid JSON object (see https://github.com/acao/codemirror-json-schema/issues/98)

Here I just pushRoot in those cases. We can consider adding the default root # pointer but the effect will be the same (i.e. by default all entries will at least match the root pointer and so will set the range to the root)

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: da8a9a811729a91e17c04225e4551c2349d5ae49

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | codemirror-json-schema | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

netlify[bot] commented 1 month ago

Deploy Preview for codemirror-json-schema ready!

Name Link
Latest commit da8a9a811729a91e17c04225e4551c2349d5ae49
Latest deploy log https://app.netlify.com/sites/codemirror-json-schema/deploys/665756e2d412630008355307
Deploy Preview https://deploy-preview-103--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.