Web IDE Extension Marketplace - YAML Extension failed to load local or remote schema files
MRs:
- fix: setup YAML extension to work with local sc... (!431 - merged)
- fix(vscode-yaml): handle incorrect uri parsing ... (!437 - merged)
- Add YAML extension schema setup to Web IDE docs (gitlab!183961 - merged)
- feat: [YAML extension] make JSON schema schemes... (!462 - merged)
Description
When testing the new WebIDE extension marketplace, I was most excited to leverage the YAML Extension (vscode-yaml – Open VSX Registry (open-vsx.org)) to facilitate the creation of YAML files used across GitOps projects.
It seems that unfortunately the extension can neither find local files, nor load remote schemas, so I can't work around it.
How to recreate:
- Create a simple json schema for testing purposes (doesn't even need to be a schema, can just be an empty file to test if it can even be loaded)
- Create a yaml file
- Go to the User setting.json file
- Add the file association between the JSON schema and the files
{
"redhat.telemetry.enabled": false,
"yaml.schemas": {
"my_schema.json": ["*.yml", "*.yaml"],
},
}
-
Create a YAML file - you should see the schema association on the top of the file, but clicking on it should show an error like
Cannot Load content for: my_schema.json. Unknown schema: 'file'- the problems window should also show an error saying that the schema has no content. -
If trying to use a remote schema, the error should be something like
Unable to load schema from 'https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json': Request vscode/content failed unexpectedly without providing any details.; when the resource URL is valid.
Impact Assessment
I believe this would impact a lot of similar extensions who rely on reading some local configuration file.