Global properties are considered "not allowed" by schema when placed in "default". #10231

Closed
opened 2026-01-31 02:15:57 +00:00 by claunia · 6 comments
Owner

Originally created by @WSLUser on GitHub (Aug 20, 2020).

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]  10.0.19041.0
Windows Terminal version (if applicable): 1.2.2234.0

Any other software? Any text editor or IDE 

Steps to reproduce

Open Windows Terminal. Open Settings. For me, that defaults to opening VS Code. Add alwaysOnTop, largePasteWarning and multiLinePasteWarning properties to defaults. Notice the json linter reports those properties are not allowed.

Expected behavior

I expect no errors to be raised by the schema.

Actual behavior

Schema doesn't accept those properties even though they are defined within the schema.

Originally created by @WSLUser on GitHub (Aug 20, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] 10.0.19041.0 Windows Terminal version (if applicable): 1.2.2234.0 Any other software? Any text editor or IDE ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Open Windows Terminal. Open Settings. For me, that defaults to opening VS Code. Add alwaysOnTop, largePasteWarning and multiLinePasteWarning properties to defaults. Notice the json linter reports those properties are not allowed. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> I expect no errors to be raised by the schema. # Actual behavior Schema doesn't accept those properties even though they are defined within the schema. <!-- What's actually happening? -->
claunia added the Issue-QuestionNeeds-Tag-FixResolution-AnsweredArea-Schema labels 2026-01-31 02:15:57 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 20, 2020):

Are you trying to add them to a profile, or to the global settings? These settings are definitely already in the schema:

2c4b868b20/doc/cascadia/profiles.schema.json (L489-L497)

2c4b868b20/doc/cascadia/profiles.schema.json (L513-L522)

Have you pointed the "$schema" property at the preview/master version of the schema?

@zadjii-msft commented on GitHub (Aug 20, 2020): Are you trying to add them to a profile, or to the global settings? These settings are definitely already in the schema: https://github.com/microsoft/terminal/blob/2c4b868b2093367f5f195399c98d870bc61e05fa/doc/cascadia/profiles.schema.json#L489-L497 https://github.com/microsoft/terminal/blob/2c4b868b2093367f5f195399c98d870bc61e05fa/doc/cascadia/profiles.schema.json#L513-L522 Have you pointed the `"$schema"` property at the preview/master version of the schema?
Author
Owner

@WSLUser commented on GitHub (Aug 20, 2020):

Yes. I placed them under "defaults" as specified in the OP. I did already check the schema in master and pointed to it. Still had those errors. https://raw.githubusercontent.com/microsoft/terminal/master/doc/cascadia/profiles.schema.json is what I used. I verified it matched the master in github by checking for the new Pane setting you added.

Also: I checked and the "multiLinePasteWarning" property also isn't accepted. I forgot about that one until you listed it here and added it.

@WSLUser commented on GitHub (Aug 20, 2020): Yes. I placed them under "defaults" as specified in the OP. I did already check the schema in master and pointed to it. Still had those errors. https://raw.githubusercontent.com/microsoft/terminal/master/doc/cascadia/profiles.schema.json is what I used. I verified it matched the master in github by checking for the new Pane setting you added. Also: I checked and the "multiLinePasteWarning" property also isn't accepted. I forgot about that one until you listed it here and added it.
Author
Owner

@WSLUser commented on GitHub (Aug 20, 2020):

I added a 'globals' property that encompassed the settings and also added yet another, the confirmCloseAllTabs. Got an error stating globals was depreciated. However I like to keep my settings organized. Just placing them in a stand-alone fashion on top of defaults isn't what I'd like to see. Can we remove the depreciation unless there's a new name to use instead?

@WSLUser commented on GitHub (Aug 20, 2020): I added a 'globals' property that encompassed the settings and also added yet another, the `confirmCloseAllTabs`. Got an error stating globals was depreciated. However I like to keep my settings organized. Just placing them in a stand-alone fashion on top of defaults isn't what I'd like to see. Can we remove the depreciation unless there's a new name to use instead?
Author
Owner

@zadjii-msft commented on GitHub (Aug 20, 2020):

Can we remove the depreciation unless there's a new name to use instead?

Nope, we're not gonna go back into that. It complicated the deserialization process unnecessarily. Once #1564 lands, hopefully people will come to rely less on the layout of the properties in the file itself.

I placed them under "defaults" as specified in the OP

Wait where exactly did you place the properties? If you placed them:

{
    "alwaysOnTop": true, // Good
    "largePasteWarning": true, // Good
    "multiLinePasteWarning": true, // Good
    "profiles": {
        "defaults": {
            "alwaysOnTop": true, // BAD
            "largePasteWarning": true, // BAD
            "multiLinePasteWarning": true, // BAD
        },
        "list": [ ... ]
    }
}

Could you just share the entire settings.json?

@zadjii-msft commented on GitHub (Aug 20, 2020): > Can we remove the depreciation unless there's a new name to use instead? Nope, we're not gonna go back into that. It complicated the deserialization process unnecessarily. Once #1564 lands, hopefully people will come to rely less on the layout of the properties in the file itself. > I placed them under "defaults" as specified in the OP Wait where _exactly_ did you place the properties? If you placed them: ```jsonc { "alwaysOnTop": true, // Good "largePasteWarning": true, // Good "multiLinePasteWarning": true, // Good "profiles": { "defaults": { "alwaysOnTop": true, // BAD "largePasteWarning": true, // BAD "multiLinePasteWarning": true, // BAD }, "list": [ ... ] } } ``` Could you just share the entire `settings.json`?
Author
Owner

@WSLUser commented on GitHub (Aug 20, 2020):

I ended up doing it like you said. I think I should be able to place them in "defaults" if we're not bringing back globals to better organize the settings. Is it possible for you to add them to there (at least until Settings UI can take care of them instead.)

@WSLUser commented on GitHub (Aug 20, 2020): I ended up doing it like you said. I think I should be able to place them in "defaults" if we're not bringing back globals to better organize the settings. Is it possible for you to add them to there (at least until Settings UI can take care of them instead.)
Author
Owner

@DHowett commented on GitHub (Aug 20, 2020):

profiles.defaults is intended for settings that can be applied to a profile. Those settings aren't that. Sorry.

@DHowett commented on GitHub (Aug 20, 2020): `profiles.defaults` is intended for _settings that can be applied to a profile_. Those settings aren't that. Sorry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10231