[PR #16103] Fix issues and warnings caused by profiles.schema.json #30836

Closed
opened 2026-01-31 09:43:16 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16103

State: closed
Merged: Yes


This addresses the following issues:

  • The JSON Schema spec doesn't actually define whether objects with
    a "properties" key still require "type": "object" or not.
    VS Code for instance largely pretends as if it's implied, but when it
    encounters them inside a oneOf tree, then it behaves as if it isn't.
    In other words, we need to always set "type": "object".
  • Declaring an oneOf containing a "type": "string" and an enum
    doesn't work, because if one of the enum cases is given, it results
    in both variants to match, since any enum is also a string.
    We have to use anyOf instead.
  • SuggestionSource used "BuiltinSuggestionSource" inside a type
    key which doesn't work. We have to use $ref for that.

Closes #13387

Validation Steps Performed

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16103 **State:** closed **Merged:** Yes --- This addresses the following issues: * The JSON Schema spec doesn't actually define whether objects with a "properties" key still require `"type": "object"` or not. VS Code for instance largely pretends as if it's implied, but when it encounters them inside a `oneOf` tree, then it behaves as if it isn't. In other words, we need to always set `"type": "object"`. * Declaring an `oneOf` containing a `"type": "string"` and an `enum` doesn't work, because if one of the `enum` cases is given, it results in both variants to match, since any `enum` is also a `string`. We have to use `anyOf` instead. * `SuggestionSource` used `"BuiltinSuggestionSource"` inside a `type` key which doesn't work. We have to use `$ref` for that. Closes #13387 ## Validation Steps Performed * VS Code stops complaining ✅ * https://www.jsonschemavalidator.net/ ✅
claunia added the pull-request label 2026-01-31 09:43:16 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30836