-
Notifications
You must be signed in to change notification settings - Fork 116
JSON validation regression #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is what I see with the latest VS Code and he current content of I don't think the content is valid:
and each of these tasks has required attributes. The implementation picks one alternative and reports these errors as hints. |
@aeschli thank you for your feedback. The schema is quite complex, but if I'm not mistaken, "do": {
"$ref": "#/$defs/taskList",
"title": "Do",
"description": "Defines the task(s) the workflow must perform."
}, Where "taskList": {
"title": "TaskList",
"description": "List of named tasks to perform.",
"type": "array",
"items": {
"type": "object",
"title": "TaskItem",
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": {
"$ref": "#/$defs/task"
}
}
}, In other words, an array of objects with only 1 property of type |
We do not properly support https://json-schema.org/draft/2020-12/schema The schema does something problematic here: Besides a
Looks like we have a bug. I suspect we overwrite To avoid the unspecified behaviour I would recommend to use this notation:
|
Type: Bug
Description
When opening a JSON file with the following content in VSCode, incorrect validation errors appear:
Expected Behavior
VSCode should validate the JSON file correctly based on the provided schema. This file is valid.
Actual Behavior
L11 will display the following validation errors:
L12 will display the following validation error:
Additional Notes
I had the validation working in a web project using Monaco Editor. So I went to the Monaco Playground to make some experiments. It seems that version 0.49.0 was validating the JSON file properly, but starting at version 0.50.0, the current behavior appeared.
System Info
VS Code version: Code 1.98.2 (ddc367ed5c8936efe395cffeec279b04ffd7db78, 2025-03-12T13:32:45.399Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Extensions (1)
A/B Experiments
The text was updated successfully, but these errors were encountered: