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

Upgrade 1.6 schema to 2020-12 #3478

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Conversation

Trenly
Copy link
Contributor

@Trenly Trenly commented Jul 27, 2023

This does not upgrade the Settings Schema as it is not reliably versioned

and it also does not upgrade the packages schema, as I felt it was not appropriate to create an entirely new schema version just for a base schema upgrade

The reason for changing to defs is based on the semi-incompatibility from draft 2019-09 and for better adherence to the standard.

The old syntax for these keywords is not an error (and the default meta-schema still validates them), so implementations can therefore offer a compatibility mode. However, migrating to the new keywords is straightforward and should be preferred.


Microsoft Reviewers: codeflow:open?pullrequest=#3478

@Trenly Trenly requested a review from a team as a code owner July 27, 2023 18:52
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Feature This is a feature request for the Windows Package Manager client. Area-Manifest This may require a change to the manifest labels Jul 27, 2023
@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 3478 in repo microsoft/winget-cli

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@denelon
Copy link
Contributor

denelon commented Jul 27, 2023

Does this still work in Visual Studio Code?

I think they only "support" an earlier version of JSON schemas.

@Trenly
Copy link
Contributor Author

Trenly commented Jul 27, 2023

Does this still work in Visual Studio Code?

I think they only "support" an earlier version of JSON schemas.

It seems to work
image

@denelon
Copy link
Contributor

denelon commented Jul 27, 2023

I don't know if this would have any impact on any of the rest of our validation code or not. I'll let one of the engineers review first.

@denelon
Copy link
Contributor

denelon commented Jul 27, 2023

It looks like we should go with $defs
https://json-schema.org/draft/2019-09/release-notes.html#semi-incompatible-changes

There weren't examples in the 09 schema, but there were a few in the 12 schema under:
https://json-schema.org/draft/2020-12/release-notes.html#open-tuple

@yao-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yao-msft yao-msft merged commit 0ed068f into microsoft:master Jul 28, 2023
@Trenly Trenly deleted the SchemaVersion branch July 28, 2023 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Manifest This may require a change to the manifest Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to schema draft 2020-12
3 participants