From 0b4965777e67e58381b8b40e91c9dab4f15e1209 Mon Sep 17 00:00:00 2001 From: jamespik <48262337+jamespik@users.noreply.github.com> Date: Tue, 8 Jun 2021 16:24:48 -0700 Subject: [PATCH] Introduce format for .Validation files (#16104) * Introduce format for .Validation files As part of the validation a pull request, a variety of tests are run to enforce various policy rules for submitting to the winget-pkgs catalog. .Validation files will provide a mechanism by which waivers to certain policy rules may be persistently granted at either an application or publisher level. * Apply suggestions from code review Co-authored-by: denelon * Update and rename ValidationSchema.json to ValidationSchema.1.0.0.json Add version of the schema to the file and aka.ms * Adjust Waiver version to validation version. Co-authored-by: denelon --- .../validation/ValidationSchema.1.0.0.json | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 schemas/JSON/validation/ValidationSchema.1.0.0.json diff --git a/schemas/JSON/validation/ValidationSchema.1.0.0.json b/schemas/JSON/validation/ValidationSchema.1.0.0.json new file mode 100644 index 0000000000000..a70dd589bd5c9 --- /dev/null +++ b/schemas/JSON/validation/ValidationSchema.1.0.0.json @@ -0,0 +1,47 @@ +{ + "$id": "https://aka.ms/winget-validation.1.0.0.schema.json", + "$schema": "https://json-schema.org/draft/2019-09/schema#", + "title": "Windows Package Manager Community Repository Manifest Validation Schema", + "description": "Describes validation file that containers policy waivers that may apply to an application or publisher.", + "type": "object", + "required": [ + "ValidationVersion", + "Waivers" + ], + "additionalProperties": true, + "properties": { + "ValidationVersion": { + "description": "Version of validation file. Used to handle breaking changes, should the need arise.", + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, + "Waivers": { + "description": "Waivers that apply to this application or publisher", + "type": "array", + "items": { + "description": "An id, test plan, and catalog path defining the waiver.", + "type": "object", + "required": [ + "WaiverIdentifier", + "TestPlan", + "PackagePath" + ], + "additionalProperties": true, + "properties": { + "WaiverIdentifier": { + "description": "Unique identifier for this waiver.", + "type": "string" + }, + "TestPlan": { + "description": "Testplan to be waived.", + "type": "string" + }, + "PackagePath": { + "description": "Path to the metadata being waived.", + "type": "string" + } + } + } + } + } +}