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

Add support for 1.6 schema #477

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/WingetCreateCLI/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/WingetCreateCLI/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1234,4 +1234,7 @@
<data name="CommandsAvailable_Message" xml:space="preserve">
<value>The following commands are available:</value>
</data>
<data name="DownloadCommandProhibited_KeywordDescription" xml:space="preserve">
<value>Indicates whether the installer is prohibited from being downloaded for offline installation</value>
</data>
</root>
4 changes: 2 additions & 2 deletions src/WingetCreateCore/Models/DefaultLocaleManifestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti

}

/// <summary>A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.5.0</summary>
/// <summary>A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.6.0</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class DefaultLocaleManifest
{
Expand Down Expand Up @@ -260,7 +260,7 @@ public partial class DefaultLocaleManifest
[Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")]
public string ManifestVersion { get; set; } = "1.5.0";
public string ManifestVersion { get; set; } = "1.6.0";

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

Expand Down
13 changes: 11 additions & 2 deletions src/WingetCreateCore/Models/InstallerManifestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ public enum UpgradeBehavior
[System.Runtime.Serialization.EnumMember(Value = @"uninstallPrevious")]
UninstallPrevious = 1,

[System.Runtime.Serialization.EnumMember(Value = @"deny")]
Deny = 2,

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
Expand Down Expand Up @@ -452,6 +455,9 @@ public partial class Installer
[Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public InstallationMetadata InstallationMetadata { get; set; }

[Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? DownloadCommandProhibited { get; set; }

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

[Newtonsoft.Json.JsonExtensionData]
Expand All @@ -464,7 +470,7 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti

}

/// <summary>A representation of a single-file manifest representing an app installers in the OWC. v1.5.0</summary>
/// <summary>A representation of a single-file manifest representing an app installers in the OWC. v1.6.0</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class InstallerManifest
{
Expand Down Expand Up @@ -600,6 +606,9 @@ public partial class InstallerManifest
[Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public InstallationMetadata InstallationMetadata { get; set; }

[Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? DownloadCommandProhibited { get; set; }

[Newtonsoft.Json.JsonProperty("Installers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.MinLength(1)]
Expand All @@ -615,7 +624,7 @@ public partial class InstallerManifest
[Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")]
public string ManifestVersion { get; set; } = "1.5.0";
public string ManifestVersion { get; set; } = "1.6.0";

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

Expand Down
4 changes: 2 additions & 2 deletions src/WingetCreateCore/Models/LocaleManifestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti

}

/// <summary>A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.5.0</summary>
/// <summary>A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.6.0</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class LocaleManifest
{
Expand Down Expand Up @@ -251,7 +251,7 @@ public partial class LocaleManifest
[Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")]
public string ManifestVersion { get; set; } = "1.5.0";
public string ManifestVersion { get; set; } = "1.6.0";

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

Expand Down
13 changes: 11 additions & 2 deletions src/WingetCreateCore/Models/SingletonManifestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ public enum UpgradeBehavior
[System.Runtime.Serialization.EnumMember(Value = @"uninstallPrevious")]
UninstallPrevious = 1,

[System.Runtime.Serialization.EnumMember(Value = @"deny")]
Deny = 2,

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
Expand Down Expand Up @@ -551,6 +554,9 @@ public partial class Installer
[Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public InstallationMetadata InstallationMetadata { get; set; }

[Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? DownloadCommandProhibited { get; set; }

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

[Newtonsoft.Json.JsonExtensionData]
Expand All @@ -563,7 +569,7 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti

}

/// <summary>A representation of a single-file manifest representing an app in the OWC. v1.5.0</summary>
/// <summary>A representation of a single-file manifest representing an app in the OWC. v1.6.0</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class SingletonManifest
{
Expand Down Expand Up @@ -823,6 +829,9 @@ public partial class SingletonManifest
[Newtonsoft.Json.JsonProperty("InstallationMetadata", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public InstallationMetadata InstallationMetadata { get; set; }

[Newtonsoft.Json.JsonProperty("DownloadCommandProhibited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? DownloadCommandProhibited { get; set; }

[Newtonsoft.Json.JsonProperty("Installers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required]
[System.ComponentModel.DataAnnotations.MinLength(1)]
Expand All @@ -838,7 +847,7 @@ public partial class SingletonManifest
[Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")]
public string ManifestVersion { get; set; } = "1.5.0";
public string ManifestVersion { get; set; } = "1.6.0";

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

Expand Down
4 changes: 2 additions & 2 deletions src/WingetCreateCore/Models/VersionManifestModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.WingetCreateCore.Models.Version
{
#pragma warning disable // Disable all warnings

/// <summary>A representation of a multi-file manifest representing an app version in the OWC. v1.5.0</summary>
/// <summary>A representation of a multi-file manifest representing an app version in the OWC. v1.6.0</summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v11.0.0.0)")]
public partial class VersionManifest
{
Expand Down Expand Up @@ -42,7 +42,7 @@ public partial class VersionManifest
[Newtonsoft.Json.JsonProperty("ManifestVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
[System.ComponentModel.DataAnnotations.RegularExpression(@"^(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){2}$")]
public string ManifestVersion { get; set; } = "1.5.0";
public string ManifestVersion { get; set; } = "1.6.0";

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

Expand Down
12 changes: 6 additions & 6 deletions src/WingetCreateCore/WingetCreateCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Microsoft.CorrelationVector" Version="1.0.42" />
<PackageReference Include="Microsoft.Msix.Utils" Version="2.1.1" />
<!--https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#generatepathproperty-->
<PackageReference Include="Microsoft.WindowsPackageManager.Utils" Version="1.7.1" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.WindowsPackageManager.Utils" Version="1.7.2" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.14" />
<PackageReference Include="NLog" Version="4.7.9" />
<PackageReference Include="NSwag.MSBuild" Version="13.11.1">
Expand Down Expand Up @@ -48,11 +48,11 @@
</ItemGroup>

<ItemGroup>
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.5.0\manifest.defaultLocale.1.5.0.json" ModelName="DefaultLocale" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.5.0\manifest.installer.1.5.0.json" ModelName="Installer" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.5.0\manifest.locale.1.5.0.json" ModelName="Locale" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.5.0\manifest.version.1.5.0.json" ModelName="Version" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.5.0\manifest.singleton.1.5.0.json" ModelName="Singleton" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.6.0\manifest.defaultLocale.1.6.0.json" ModelName="DefaultLocale" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.6.0\manifest.installer.1.6.0.json" ModelName="Installer" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.6.0\manifest.locale.1.6.0.json" ModelName="Locale" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.6.0\manifest.version.1.6.0.json" ModelName="Version" />
<SchemaFiles Include="$(PkgMicrosoft_WindowsPackageManager_Utils)\content\schemas\JSON\manifests\v1.6.0\manifest.singleton.1.6.0.json" ModelName="Singleton" />
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Inputs="@(SchemaFiles)" Outputs="@(SchemaFiles -> '$(ProjectDir)Models\%(ModelName)ManifestModels.cs')">
Expand Down
Loading