Skip to content

Monaco editor adds warning: "Draft 2020-12 schemas are not yet fully supported." #2

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

Closed
dstotijn opened this issue Aug 18, 2022 · 0 comments · Fixed by #21
Closed

Monaco editor adds warning: "Draft 2020-12 schemas are not yet fully supported." #2

dstotijn opened this issue Aug 18, 2022 · 0 comments · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@dstotijn
Copy link
Contributor

image

It's a bit tricky to fully hook into the JSON schema validation logic of Monaco Editor, but we can at least filter out/hide the warning in our bottom drawer. So a fix would look like this:

image

We'd still have the squiggly line in the editor, but at least no warning text and icon in the bottom drawer.

@dstotijn dstotijn self-assigned this Aug 18, 2022
dstotijn added a commit that referenced this issue Sep 20, 2022
@dstotijn dstotijn added the bug Something isn't working label Sep 20, 2022
dstotijn added a commit that referenced this issue Oct 3, 2022
Use custom `JSONWorker` so we can import our own up-to-date version of
`vscode-json-languageservice` which has support for JSON Schema Draft
2020-12.

Fixes #2 #patch

### QA

To test, visit https://deploy-preview-21--gobl-build.netlify.app/ and
type/paste a JSON doc that references a Draft 2020-12 schema. E.g.:

```json
{
    "$schema": "https://json-schema.org/learn/examples/address.schema.json"
}
```

You **shouldn't** see the warning described in #21.

(Note: You'll see an error stating that the `$schema` value is not right
— that's an expected error, ignore for this QA)
dstotijn added a commit that referenced this issue Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant