microsoft / microsoft/vscode-json-languageservice
Cannot resolve non-ascii url-encoded JSON schema url
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 326
- Forks
- 145
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 9
Description
When I apply JSON schema with URL including non-ascii character, Unable to load schema from '...': Request path contains unescaped characters. warning occurs despite the URL being URL-encoded.
Steps to Reproduce
- Open a new VSCode window.
- Open a new file.
- Write JSON code as below:
{
"$schema": "https://libertygame.miraheze.org/w/index.php?title=%EB%A6%AC%EB%B2%84%ED%8B%B0%EA%B2%8C%EC%9E%84:%EA%B2%8C%EC%9E%84_%EB%A9%94%ED%83%80%EB%8D%B0%EC%9D%B4%ED%84%B0/%EC%8A%A4%ED%82%A4%EB%A7%88.json&action=raw&ctype=application/json"
}
What happened
Unable to load schema from 'https://libertygame.miraheze.org/w/index.php?title=리버티게임:게임_메타데이터/스키마.json&action=raw&ctype=application/json': Request path contains unescaped characters. warning occurs. The URL in the warning message is URL-decoded. I think it decodes the URL and tries to resolve the schema with decoded URL so that error occurs.
Warning message data
[{
"resource": "Untitled-1",
"owner": "_generated_diagnostic_collection_name_#1",
"code": "768",
"severity": 4,
"message": "Unable to load schema from 'https://libertygame.miraheze.org/w/index.php?title=리버티게임:게임_메타데이터/스키마.json&action=raw&ctype=application/json': Request path contains unescaped characters.",
"startLineNumber": 2,
"startColumn": 16,
"endLineNumber": 2,
"endColumn": 246
}]
What should it be
JSON schema should be imported successfully without any errors. I believe the schema in that URL is valid.
Environment
- VS Code Version: 1.76.0
- OS Version: Windows 11 Version 22H2 Build 22621.1344 (Windows_NT x64 10.0.22621)
Contributor guide
No contributing guide indexed for this repository
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 schema loading with the non-ASCII, URL-encoded URL from the issue and trace the JSON schema URL resolution request path. Done means the schema imports successfully without a “Request path contains unescaped characters” warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100