Templates/MobileApps/Windows/WinGet/Schemas/winGetAppPreset.schema.json

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://intunehydrationkit.dev/schemas/winget-app-preset.schema.json",
    "title": "Intune Hydration Kit WinGet app preset",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "$schema",
        "schemaVersion",
        "presetId",
        "displayName",
        "description",
        "selectionCriteria",
        "appIds"
    ],
    "properties": {
        "$schema": {
            "type": "string"
        },
        "schemaVersion": {
            "type": "string",
            "const": "1.0.0"
        },
        "presetId": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        },
        "displayName": {
            "type": "string",
            "minLength": 1
        },
        "description": {
            "type": "string",
            "minLength": 1
        },
        "selectionCriteria": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "candidateSource",
                "selectionBiases"
            ],
            "properties": {
                "candidateSource": {
                    "type": "string",
                    "minLength": 1
                },
                "selectionBiases": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "string",
                        "minLength": 1
                    }
                }
            }
        },
        "appIds": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
        }
    }
}