Fix Draft 2020-12 schema loading error in Monaco editor#204
Fix Draft 2020-12 schema loading error in Monaco editor#204imApoorva36 wants to merge 2 commits intojson-schema-org:mainfrom
Conversation
jdesrosiers
left a comment
There was a problem hiding this comment.
That is obviously not an equivalent of a the 2020-12 meta-schema. Please don't submit slop from an LLM unless you fully understand what it has generated and have verified that it makes sense.
Are you sure you still need to register the meta-schema even after updating the monaco dependency? I wasn't expecting that it would be necessary. Did you determine if monaco is fully up-to-date with the recent changes to the JSON language server?
|
Hi @jdesrosiers Also, I dug deeper into why the Monaco update alone didn’t resolve this. The current Monaco release (0.55.1) bundles vscode-json-languageservice@5.3.11. The upstream fixes for Draft 2020-12 (bundled flat schema + warning removal) landed in vscode-json-languageservice version 5.6.3 (via PRs #294 and #295). Hence, standalone Monaco is effectively still behind that change. Given this gap, I’ve updated the PR to:
This stops the "No schema request service" error and the $dynamicRef warning. Would love to know your thoughts! |
Great. That's the information we need. I think instead of putting in this hack, the next step is raising an issue with Monaco asking them to update their dependency and telling them why we need it. Hopefully, that gets resolved in reasonable amount of time and no hack is necessary. |
|
Awesome! In the meantime, is there anything you'd like me to change in this PR? For example, should I keep the Monaco version bump but remove the diagnostic suppression, or would you prefer I convert this to a draft until the upstream issue moves forward?
|
|
Yes, please open an issue with Monaco. Don't forget to link our issue (#103) in the issue that you create with them. I think converting this to a draft PR is a good idea for now. Ideally, in the end, the only change that should be needed for this PR is updating the Monaco dependency. |
|
Sounds good I’ve also opened an upstream issue with the Monaco team here: microsoft/monaco-editor#5172. I’ll keep this PR updated as the upstream issue progresses. Thanks for the guidance. |
What kind of change does this PR introduce?
Bugfix
Issue Number:
Screenshots/videos:
If relevant, did you update the documentation?
NA
Summary
Fixes the editor error:
by updating the Monaco dependency and registering a local Draft 2020-12 schema mapping.
This prevents the editor from attempting to fetch the meta-schema remotely and removes the runtime error while keeping existing validation behavior unchanged.
Does this PR introduce a breaking change?
No