Skip to content
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

Fix matches of multiple schemas on "profiles" #4045

Merged
merged 1 commit into from
Dec 30, 2019

Conversation

IllusionMH
Copy link
Contributor

Summary of the Pull Request

Adds proper type for ProfilesObject definition to avoid warnings about matches of multiple schemas.

References

Original issue: #3909
Related PR: #3892
Relates VSCode issue: microsoft/vscode#86738

PR Checklist

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

  1. Download doc/cascadia/profiles.schema.json locally
  2. Open profiles.json from WT in VSCode
  3. Replace $schema value with path to local copy (verified that all errors are still in place and validations works as before)
  4. Update it with type on ProfilesObject
  5. Check that Matches multiple schemas when only one must validate warning is fixed

Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that’s really subtle. Thanks!
I’ll sign off on this, but our two-reviewer policy might make it a little hard to get a change in over Christmas :)

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeez why didn't my json schema validator not catch that this schema was missing this :P?

@zadjii-msft zadjii-msft merged commit 6bee2a6 into microsoft:master Dec 30, 2019
@IllusionMH IllusionMH deleted the patch-1 branch December 30, 2019 14:58
@IllusionMH
Copy link
Contributor Author

@zadjii-msft just in case you are interested. Looks like VS Code relies on validation provided by vscode-json-languageservice package.
validator source

carlos-zamora pushed a commit that referenced this pull request Jul 27, 2023
Adds proper `type` for `SchemePair` definition to avoid warnings about matches of multiple schemas.

Same fix as #4045

## Validation Steps Performed
- Pointed $schema to local file instead of https://aka.ms/terminal-profiles-schema
- Confirmed warning goes away when using a string
- Confirmed using the light/dark object format still passes validation
- Confirmed values like `"colorScheme": 3` no longer incorrectly pass validation whereas they would before
DHowett pushed a commit that referenced this pull request Jul 27, 2023
Adds proper `type` for `SchemePair` definition to avoid warnings about matches of multiple schemas.

Same fix as #4045

## Validation Steps Performed
- Pointed $schema to local file instead of https://aka.ms/terminal-profiles-schema
- Confirmed warning goes away when using a string
- Confirmed using the light/dark object format still passes validation
- Confirmed values like `"colorScheme": 3` no longer incorrectly pass validation whereas they would before

(cherry picked from commit 57b9549)
Service-Card-Id: 90012052
Service-Version: 1.17
DHowett pushed a commit that referenced this pull request Jul 27, 2023
Adds proper `type` for `SchemePair` definition to avoid warnings about matches of multiple schemas.

Same fix as #4045

## Validation Steps Performed
- Pointed $schema to local file instead of https://aka.ms/terminal-profiles-schema
- Confirmed warning goes away when using a string
- Confirmed using the light/dark object format still passes validation
- Confirmed values like `"colorScheme": 3` no longer incorrectly pass validation whereas they would before

(cherry picked from commit 57b9549)
Service-Card-Id: 90012053
Service-Version: 1.18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vscode warning: matches multiple schemas when only one must validate
3 participants