Recurring vscode JSON validation issues #17810

Closed
opened 2026-01-31 05:54:12 +00:00 by claunia · 6 comments
Owner

Originally created by @RivenSkaye on GitHub (Jun 27, 2022).

Recently started using Windows Terminal to try and bring all shells to one place. And it does its job perfectly, even allowing me to run an MSYS2 env at the click of a button! However, when editing the settings.json I noticed a couple validation warnings.

First off: Matches multiple schemas when only one must validate.
You guessed it, the "backgroundImage" key is acting up again, just like in 2019's #3909 which was supposedly fixed with #4045
Flagged in settings.json > "profiles" > "defaults" && "list" > *
Does not get flagged when put next to "profiles" (so in the top level of settings.json), while this should cause the JSON to not validate at all.

Next up is a repeat of #11629 Property intenseTextStyle is not allowed. which was closed due to the issue going stale.
This gets flagged in settings.json > "profiles" > "defaults" && "list" > *
Does not get flagged when put next to "profiles" (so in the top level of settings.json), while this should cause the JSON to not validate at all.

image

If requested, I can try other validators to see if the issue lies in vscode instead of here. Opted to open it here first because 3909 was also flagged and fixed as being a JSON schema issue

For completeness sake, let me add:
Windows Terminal version 1.13.11431.0
OS: Microsoft Windows [Version 10.0.19044.1766]

Originally created by @RivenSkaye on GitHub (Jun 27, 2022). Recently started using Windows Terminal to try and bring all shells to one place. And it does its job perfectly, even allowing me to run an MSYS2 env at the click of a button! However, when editing the `settings.json` I noticed a couple validation warnings. First off: `Matches multiple schemas when only one must validate.` You guessed it, the `"backgroundImage"` key is acting up again, just like in 2019's #3909 which was supposedly fixed with #4045 Flagged in `settings.json` > `"profiles"` > `"defaults"` && `"list"` > `*` Does **not** get flagged when put next to `"profiles"` (so in the top level of `settings.json`), while this _should_ cause the JSON to not validate at all. Next up is a repeat of #11629 `Property intenseTextStyle is not allowed.` which was closed due to the issue going stale. This gets flagged in `settings.json` > `"profiles"` > `"defaults"` && `"list"` > `*` Does **not** get flagged when put next to `"profiles"` (so in the top level of `settings.json`), while this _should_ cause the JSON to not validate at all. ![image](https://user-images.githubusercontent.com/14993038/175920255-8737093a-a1c4-4cc1-aeb2-97d010b2b0b2.png) If requested, I can try other validators to see if the issue lies in vscode instead of here. Opted to open it here first because 3909 was also flagged and fixed as being a JSON schema issue For completeness sake, let me add: Windows Terminal version 1.13.11431.0 OS: Microsoft Windows [Version 10.0.19044.1766]
Author
Owner

@neersighted commented on GitHub (Oct 13, 2022):

It appears that intenseTextStyle is listed in #/$defs/AppearanceConfig but not #/$defs/Profile -- that one is very straightforward at least.

@neersighted commented on GitHub (Oct 13, 2022): It appears that `intenseTextStyle` is listed in `#/$defs/AppearanceConfig` but not `#/$defs/Profile` -- that one is very straightforward at least.
Author
Owner

@jamespack commented on GitHub (Jul 9, 2023):

The JSON Schema Validator doesnt seem to complain about it. Maybe a VSCode issue?

image image
@jamespack commented on GitHub (Jul 9, 2023): The [JSON Schema Validator](https://www.jsonschemavalidator.net/) doesnt seem to complain about it. Maybe a VSCode issue? <img width="1194" alt="image" src="https://github.com/microsoft/terminal/assets/2086722/9a3d5725-65b5-4edb-88e3-80d70a019c15"> <img width="1195" alt="image" src="https://github.com/microsoft/terminal/assets/2086722/f333ab96-fb1e-44f4-8620-1ea2a8015197">
Author
Owner

@daemon-reconfig commented on GitHub (Oct 5, 2023):

hello
is this issue is fixed?

@daemon-reconfig commented on GitHub (Oct 5, 2023): hello is this issue is fixed?
Author
Owner

@lhecker commented on GitHub (Oct 5, 2023):

In the latest VS Code and Windows Terminal I can't see any issues either. @zadjii-msft are you okay with closing this as well?

@lhecker commented on GitHub (Oct 5, 2023): In the latest VS Code and Windows Terminal I can't see any issues either. @zadjii-msft are you okay with closing this as well?
Author
Owner

@RivenSkaye commented on GitHub (Oct 5, 2023):

I'm still seeing the same warnings right now on "profiles": { "defaults": { "backgroundImage": "desktopWallpaper", and "theme": "dark". Changing the latter to "Theme" fixes the warning without breaking the terminal, but that still leaves the bg image key which has been the issue since the start.

Copying the key, or cutting and pasting it for all profiles, repeats the warning on every instance. A quick search through the schema still lists the "backgroundImage" key twice; once in "AppearanceConfig" and once in "Profile".

Reply to the previous messages: no, this issue is not yet fixed

Update: just pushed it through https://jsonschemavalidator.net and that's giving me the same error and 4 more.
Upstream schema + my JSON pushed into the validator

@RivenSkaye commented on GitHub (Oct 5, 2023): I'm still seeing the same warnings right now on `"profiles": { "defaults": { "backgroundImage": "desktopWallpaper",` and `"theme": "dark"`. Changing the latter to `"Theme"` fixes the warning without breaking the terminal, but that still leaves the bg image key which has been the issue since the start. Copying the key, or cutting and pasting it for all profiles, repeats the warning on every instance. A quick search through the schema still lists the `"backgroundImage"` key twice; once in `"AppearanceConfig"` and once in `"Profile"`. Reply to the previous messages: no, this issue is not yet fixed Update: just pushed it through https://jsonschemavalidator.net and that's giving me the same error _and 4 more_. Upstream schema + my JSON [pushed into the validator](https://jsonschemavalidator.net/s/BjOnkTqg)
Author
Owner

@lhecker commented on GitHub (Oct 5, 2023):

Oh I see, now I get it. I found all the offending keys with

jq '.. | select(.oneOf?) | select(.type?)' doc/cascadia/profiles.schema.json

which are exactly the two you mentioned. There are more issues on top of that. Most type definitions in our schema are actually invalid. I'll open a PR in a bit.

@lhecker commented on GitHub (Oct 5, 2023): Oh I see, now I get it. I found all the offending keys with ```bash jq '.. | select(.oneOf?) | select(.type?)' doc/cascadia/profiles.schema.json ``` which are exactly the two you mentioned. There are more issues on top of that. Most type definitions in our schema are actually invalid. I'll open a PR in a bit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17810