Skip to content

Unable to load schema from workspace using settings within GitLab Web IDE #1194

@kieran-ryan

Description

@kieran-ryan

Describe the bug

Schema will not load from workspace when configured within .vscode/settings.json and opened within the GitLab Web IDE. Though, declaring as a directive works, such as # yaml-language-server: $schema=./dressSize.json.

Image

Assumption that the leading slash / is the cause or other path-handling differences between node and web based extension distributions.

Expected Behavior

Schema loads from workspace when configured through VSCode extension settings within the GitLab Web IDE.

Where a path is determined by the Language Server to not exist, that the corresponding diagnostic reflects this state; rather than No content.

Current Behavior

Schema does not load from workspace when configured through VSCode extension settings within the GitLab Web IDE.

Diagnostic message indicates No content when a schema path is determined to not exist.

Works with directives such as # yaml-language-server: $schema=./dressSize.json.

Image

Steps to Reproduce

Running prerelease v1.20 within the GitLab Web IDE, configure the extension (including trying "file:///schema.json")...

{
  "yaml.schemas": {
    "dressSize.json": "references-schema.yaml"
  }
}

...to the following yaml...

dress:
  size: -2

...and schema.

{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "properties": {
    "dress": {
      "properties": {
        "size": {
          "oneOf": [
            {
              "type": "integer",
              "minimum": 0
            },
            {
              "type": "string",
              "enum": ["S", "M", "L", "XL", "XXL", "XXXL"]
            }
          ]
        }
      }
    }
  }
}

Environment

  • Windows (Edge)
  • Mac (Safari)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions