-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Description
Describe the bug
Schemas with URL-encoded characters in $ref paths do not resolve. For example, a reference to something like "#/definitions/Interface<type>" fails to resolve if it is written as "#/definitions/Interface%3Ctype%3E".
Expected Behavior
The YAML language server should properly resolve URL-encoded $ref paths (e.g., #/definitions/Interface%3Ctype%3E) and provide IntelliSense, validation, and other features based on the referenced schema definition.
Current Behavior
When using a $ref path that includes URL-encoded characters, vscode-yaml does not recognize or resolve the schema definition, resulting in validation errors (e.g. $ref '/definitions/Interface%3Ctype%3E' in 'file:///.../schema.json' can not be resolved.).
Steps to Reproduce
- Create a file named
example.schema.jsoncontaining the following schema:{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "myProperty": { "$ref": "#/definitions/Interface%3Ctype%3E" } }, "definitions": { "Interface<type>": { "type": "object", "properties": { "foo": { "type": "string" } } } } } - Create a file named
example.yamlcontaining the following content:# yaml-language-server: $schema=example.schema.json myProperty: foo: bar
- Observe that the schema reference
#/definitions/Interface%3Csomething%3Eis not resolved, resulting in a validation error.
Environment
- Windows
- Mac
- Linux
- other (please specify)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done