Partial JSON Schema 2020-12 support results in failuer to highlight invalid schema features?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- json, typescript
- Domain
- devtools
Research direction
The report names only the VS Code editor validation behavior and a JSON Schema 2020-12 example, not a source file or test. Reproduce the example in the JSON language service and trace how the schema is processed; done means the handling of array-valued items is clarified or validated consistently with the reported prefixItems diagnostic.
Written by the indexing model from the issue text.
Description
Imagine the following JSON Schema...
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": "",
"items": [1,2,3],
"prefixItems": 123
}
In 2020-12, the tuple form of items was replaced with prefixItems. items can now only be an object and not an array.
However when we look at the in editor validation result...

The value of prefixItems is correctly identified as not allowed to be a number. It must be an array.
However, the value of items is not identified as not allowed to be an array.
The VSCode site says
The JSON support shipped with VS Code supports all draft versions from Draft 4 to JSON Schema Draft 2020-12.
But that doesn't seem to be exactly accurate, especially when a Schema can't be validated as the meta-schema can't be used.
What processing model IS being used when JSON documents identify as using 2020-12?
Don't get me wrong, I'm glad you're working on this!
As always, the JSON Schema team is more than happy to answer questions, and may now even have some time to help fix things if allowed.
- 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 ·