Skip to content

NPM package.json JSON schema: While IntelliSense works as expected, the popup message does not reflect the schema title. #278962

@sangafabrice

Description

@sangafabrice

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.106.2 (user setup)
  • OS Version: Windows 10

Steps to Reproduce:

  1. Download the package.json schema from SchemaStore into .vscode/package.schema.json at the workspace root:

    curl https://www.schemastore.org/package.json --output .vscode/package.schema.json

    The schema defines the title as:

    {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "title": "JSON schema for NPM package.json files"
      ...
    }
  2. Map the schema to package.json files in .vscode/settings.json:

    {
        "json.schemas": [
            {
                "fileMatch": [ "/package.json" ],
                "url": "./.vscode/package.schema.json"
            }
        ],
        "json.schemaDownload.enable": false
    }
  3. Open a package.json file and hover over the opening curly bracket {.
    Instead of showing the schema title, the hover still displays the default message:

    XML Language server contributions to package.json
    

    Hover message screenshot


Additional Notes

  • The issue is not limited to SchemaStore downloads. Even if the schema title is manually modified and json.schemaDownload.enable is set to true, the updated title does not appear in package.json files.
  • This suggests the schema title is consistently overridden by the default message, regardless of configuration.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions