SchemaStore/schemastore

JSON files are not automatically validated based on their `fileMatch` patterns

Closed this issue · 0 comments

Area with issue?

JSON Schema

✔️ Expected Behavior

No .vscode/settings.json configuration required to enable autocompletion and validation of the corresponding JSON documents from SchemaStore.

❌ Actual Behavior

.vscode/settings.json configuration is required to enable autocompletion and validation of the corresponding JSON documents from SchemaStore:

{
    "json.schemas": [
        {
            "fileMatch": [
                "{{pattern}}"
            ],
            "url": "https://json.schemastore.org/{{schema}}"
        }
    ]
}

💡 Steps to reproduce

  1. Create file winutil/config/applications.json somewhere.
  2. Fill it with the following content:
{
    "aapplication": {
        // cursor is here
    }
}
  1. Press Ctrl+Space and get no completion nor validation, instead of hints based on this schema.

As a workaround these settings can be specified:

{
    "json.schemas": [
        {
            "fileMatch": [
                "winutil/config/applications.json"
            ],
            "url": "https://json.schemastore.org/winutil-applications"
        }
    ]
}

YAML or JSON file that does not work.

No response

IDE or code editor.

Visual Studio Code

Are you making a PR for this?

No, someone else must create the PR.