Skip to content

[BUG] Schema using https://json-schema.org/draft-07/schema# with v1.16.0 #1096

@BernieWhite

Description

@BernieWhite

Describe the bug

Since the release of extension v1.16.0 a new error is generated in the extension Runtime Status / Uncaught Errors of the extension.

Request yaml/get/jsonSchema failed with message: no schema with key or ref "https://json-schema.org/draft-07/schema#"
2025-02-13 17:37:14.764 [error] Error: Request yaml/get/jsonSchema failed with message: no schema with key or ref "https://json-schema.org/draft-07/schema#"
    at c:\Users\nnn\.vscode\extensions\redhat.vscode-yaml-1.16.0\dist\extension.js:2:312349
    at c:\Users\nnn\.vscode\extensions\redhat.vscode-yaml-1.16.0\dist\extension.js:2:312643
    at Immediate.<anonymous> (c:\Users\nnn\.vscode\extensions\redhat.vscode-yaml-1.16.0\dist\extension.js:2:313008)
    at processImmediate (node:internal/timers:483:21)

When a YAML uses a target schema that is based on https://json-schema.org/draft-07/schema# with https:// scheme the error is generated.

Also, the impact is that the YAML file is not validated against the target schema.

When the schema is with the http:// scheme i.e. http://json-schema.org/draft-07/schema# there is no issue and no error is generated.

This issue does not occur in extension release 1.15.0, and the YAML schema is validated without error as expected.

Expected Behavior

Schemas using https:// scheme and specifically https://json-schema.org/draft-07/schema# should not cause an issue as both this base schema and HTTPS should be common.

Current Behavior

YAML based on a schema using https://json-schema.org/draft-07/schema# does not validate or provide information on hover. It appears the schema is not loaded.

Steps to Reproduce

  1. Create a schema based on https://json-schema.org/draft-07/schema#.
  2. Configure VSCode settings for the workspace to point to the schema using yaml.schemas.
  3. Attempt to hover over a node in a YAML file using the schema or make a change that violates the scheme rules.

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions