How to: $ref to external schemas in VSC
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- json, typescript, vscode
- Domain
- developer-experience, tooling
Research direction
No files, tests, or entry points are named. Start by tracing how the JSON language service registers schemas and resolves external $ref URLs, then verify whether IntelliSense exposes properties from anotherNestedSchema.json in the shown instance.
Written by the indexing model from the issue text.
Description
Where would one register referenced schemas in VSC so they would be available to Intellisense?
I have a schema with multiple (possibly hundreds) of subschemas which I want to write a data instance against. How can I use VSC Intellisense to guide me through the schema while I'm creating an instance?
Take this concocted example:
{
"id": "http://example.com/common/mainSchema.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf": [
{
"type": "object",
"properties": {
"id": {
"$ref": "simpleIDType_v01.json#"
}
}
},
{
"$ref": "anotherNestedSchema.json#"
}
]
}
{
"id": "http://example.com/common/simpleIDType_v01.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-zA-Z0-9]+$"
}
{
"id": "http://example.com/common/anotherNestedSchema.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"organizationId": {
"$ref": "simpleIDType_v01.json#"
}
}
}
#instance
{
"$schema": "http://example.com/common/mainSchema.json",
"id": "testing",
" << I want Intellisense to provide the available properties in the `allOf/1` subschema (anotherNestedSchema).
- Dominant language
- TypeScript
- Stars
- 326
- Forks
- 145
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 9
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.
More from microsoft/vscode-json-languageservice
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
microsoft/vscode-json-languageservice#356 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/vscode-json-languageservice#354 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
microsoft/vscode-json-languageservice#350 · 1 comment ·
All issues in microsoft/vscode-json-languageservice
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·