fix: setup YAML extension to work with local schema

Issue: Web IDE Extension Marketplace - YAML Extension ... (#407 - closed)

What does this MR do and why?

Fixes local schema loading of the vscode-yaml extension by registering the extension upon installation.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After

before.mov

Extension already installed:

already_installed.mov

New install:

new_install.mov

How to set up and validate locally

  • Pull this branch and start the Example App

  • Install the vscode-yaml extension from marketplace

  • Create a local JSON schema, content can be empty

  • Add the following YAML schema config in either your user or workspace setting:

    yaml.schemas: {
      "gitlab-web-ide://~/<path_to_your_json_schema>": ["*.yaml", "*.yml"]
    }
  • Open a yaml file, you should see your local JSON schema appear at the top and click on it.

  • It should open the local JSON schema file.

Numbered steps to set up and validate the change are strongly suggested.

Edited by Cindy Halim

Merge request reports

Loading