redhat-developer / redhat-developer/yaml-language-server
Schema reference in URL hash can’t be resolved
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 352
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 11
Description
Describe the bug
When a schema uri uses a hash to select a nested schema, the language server can no longer resolve it. This was working in yaml-language-server 1.1.0 and below. It first appeared in 1.1.1.
Expected Behavior
A nested schema can be referenced using a URL hash.
Current Behavior
The following error occurs in VS Code:
[{
"resource": "/home/remco/Projects/appsemble/apps/person/app-definition.yaml",
"owner": "_generated_diagnostic_collection_name_#0",
"code": "768",
"severity": 8,
"message": "$ref '%2Fcomponents%2Fschemas%2FAppDefinition' in 'https://appsemble.app/api.json' can not be resolved.",
"source": "YAML",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2
}]
Steps to Reproduce
- Create a file named
app-definition.yaml. - Open it in VS Code
- Enter at least one character
Environment
- Windows
- Mac
- Linux
- other (please specify) remcohaszing/monaco-yaml#126 (demo)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nested-schema URL-hash reference in VS Code and compare behavior between yaml-language-server 1.1.0 and 1.1.1. Trace schema resolution for the encoded hash; the fix is complete when the nested schema resolves without the reported diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100