Skip to content

Commit

Permalink
The initial yaml schema manifest for version 1.7.0 (microsoft#3876)
Browse files Browse the repository at this point in the history
This PR introduces the

1.  initial set of v1.7.0 manifest schema, based on v1.6.0, and 
2. includes necessary test manifests and validation tests for V1.7.0. 

**[How Validated:]**

1. The changes have been validated by successfully compiling the
winget-cli solution folder and
2. Running AppInstallerCLITests with the [ManifestValidation] filter,
confirming all tests pass.

**[Test Results:]**

```
Filters: [ManifestValidation]
===============================================================================
All tests passed (3988 assertions in 30 test cases)

```
<!-- To check a checkbox place an "x" between the brackets. e.g: [x] -->

- [x] I have signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs).
- [x] This pull request is related to an issue.

-----

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/3876)

---------

Co-authored-by: Madhusudhan Gumbalapura Sudarshan <[email protected]>
  • Loading branch information
Madhusudhan-MSFT and Madhusudhan Gumbalapura Sudarshan authored Nov 13, 2023
1 parent 12b4240 commit 9e9a931
Show file tree
Hide file tree
Showing 19 changed files with 3,090 additions and 2 deletions.
278 changes: 278 additions & 0 deletions schemas/JSON/manifests/v1.7.0/manifest.defaultLocale.1.7.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
{
"$id": "https://aka.ms/winget-manifest.defaultlocale.1.7.0.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.7.0",
"definitions": {
"Url": {
"type": [ "string", "null" ],
"pattern": "^([Hh][Tt][Tt][Pp][Ss]?)://.+$",
"maxLength": 2048,
"description": "Optional Url type"
},
"Tag": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 40,
"description": "Package moniker or tag"
},
"Agreement": {
"type": "object",
"properties": {
"AgreementLabel": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 100,
"description": "The label of the Agreement. i.e. EULA, AgeRating, etc. This field should be localized. Either Agreement or AgreementUrl is required. When we show the agreements, we would Bold the AgreementLabel"
},
"Agreement": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 10000,
"description": "The agreement text content."
},
"AgreementUrl": {
"$ref": "#/definitions/Url",
"description": "The agreement URL."
}
}
},
"Documentation": {
"type": "object",
"properties": {
"DocumentLabel": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 100,
"description": "The label of the documentation for providing software guides such as manuals and troubleshooting URLs."
},
"DocumentUrl": {
"$ref": "#/definitions/Url",
"description": "The documentation URL."
}
}
},
"Icon": {
"type": "object",
"properties": {
"IconUrl": {
"$ref": "#/definitions/Url",
"description": "The url of the hosted icon file"
},
"IconFileType": {
"type": "string",
"enum": [
"png",
"jpeg",
"ico"
],
"description": "The icon file type"
},
"IconResolution": {
"type": [ "string", "null" ],
"enum": [
"custom",
"16x16",
"20x20",
"24x24",
"30x30",
"32x32",
"36x36",
"40x40",
"48x48",
"60x60",
"64x64",
"72x72",
"80x80",
"96x96",
"256x256"
],
"description": "Optional icon resolution"
},
"IconTheme": {
"type": [ "string", "null" ],
"enum": [
"default",
"light",
"dark",
"highContrast"
],
"description": "Optional icon theme"
},
"IconSha256": {
"type": [ "string", "null" ],
"pattern": "^[A-Fa-f0-9]{64}$",
"description": "Optional Sha256 of the icon file"
}
},
"required": [
"IconUrl",
"IconFileType"
]
}
},
"type": "object",
"properties": {
"PackageIdentifier": {
"type": "string",
"pattern": "^[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}(\\.[^\\.\\s\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]{1,32}){1,7}$",
"maxLength": 128,
"description": "The package unique identifier"
},
"PackageVersion": {
"type": "string",
"pattern": "^[^\\\\/:\\*\\?\"<>\\|\\x01-\\x1f]+$",
"maxLength": 128,
"description": "The package version"
},
"PackageLocale": {
"type": "string",
"default": "en-US",
"pattern": "^([a-zA-Z]{2,3}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*$",
"maxLength": 20,
"description": "The package meta-data locale"
},
"Publisher": {
"type": "string",
"minLength": 2,
"maxLength": 256,
"description": "The publisher name"
},
"PublisherUrl": {
"$ref": "#/definitions/Url",
"description": "The publisher home page"
},
"PublisherSupportUrl": {
"$ref": "#/definitions/Url",
"description": "The publisher support page"
},
"PrivacyUrl": {
"$ref": "#/definitions/Url",
"description": "The publisher privacy page or the package privacy page"
},
"Author": {
"type": [ "string", "null" ],
"minLength": 2,
"maxLength": 256,
"description": "The package author"
},
"PackageName": {
"type": "string",
"minLength": 2,
"maxLength": 256,
"description": "The package name"
},
"PackageUrl": {
"$ref": "#/definitions/Url",
"description": "The package home page"
},
"License": {
"type": "string",
"minLength": 3,
"maxLength": 512,
"description": "The package license"
},
"LicenseUrl": {
"$ref": "#/definitions/Url",
"description": "The license page"
},
"Copyright": {
"type": [ "string", "null" ],
"minLength": 3,
"maxLength": 512,
"description": "The package copyright"
},
"CopyrightUrl": {
"$ref": "#/definitions/Url",
"description": "The package copyright page"
},
"ShortDescription": {
"type": "string",
"minLength": 3,
"maxLength": 256,
"description": "The short package description"
},
"Description": {
"type": [ "string", "null" ],
"minLength": 3,
"maxLength": 10000,
"description": "The full package description"
},
"Moniker": {
"$ref": "#/definitions/Tag",
"description": "The most common package term"
},
"Tags": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/Tag"
},
"maxItems": 16,
"uniqueItems": true,
"description": "List of additional package search terms"
},
"Agreements": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/Agreement"
},
"maxItems": 128
},
"ReleaseNotes": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 10000,
"description": "The package release notes"
},
"ReleaseNotesUrl": {
"$ref": "#/definitions/Url",
"description": "The package release notes url"
},
"PurchaseUrl": {
"$ref": "#/definitions/Url",
"description": "The purchase url for acquiring entitlement for the package."
},
"InstallationNotes": {
"type": [ "string", "null" ],
"minLength": 1,
"maxLength": 10000,
"description": "The notes displayed to the user upon completion of a package installation."
},
"Documentations": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/Documentation"
},
"maxItems": 256
},
"Icons": {
"type": [ "array", "null" ],
"items": {
"$ref": "#/definitions/Icon"
},
"maxItems": 1024
},
"ManifestType": {
"type": "string",
"default": "defaultLocale",
"const": "defaultLocale",
"description": "The manifest type"
},
"ManifestVersion": {
"type": "string",
"default": "1.7.0",
"pattern": "^(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}$",
"description": "The manifest syntax version"
}
},
"required": [
"PackageIdentifier",
"PackageVersion",
"PackageLocale",
"Publisher",
"PackageName",
"License",
"ShortDescription",
"ManifestType",
"ManifestVersion"
]
}
Loading

0 comments on commit 9e9a931

Please sign in to comment.