{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://github.com/dxatscale/sfpowerscripts/blob/develop/packages/sfpowerscripts-cli/resources/releasedefinitiongenerator.schema.json",
    "title": "release definition generator",
    "description": "The definition for generating a release defintion using generator command",
    "type": "object",
    "additionalProperties": true,
    "dependencies": {
        "baselineOrg": ["skipIfAlreadyInstalled"]
    },
    "properties": {
        "excludeArtifacts": {
            "type": "array",
            "title": "Exclude the below artifacts while creating a release definition",
            "items": {
                "type": "string"
            }
        },
        "includeOnlyArtifacts": {
            "type": "array",
            "title": "Include the below artifacts while creating a release definition",
            "items": {
                "type": "string"
            }
        },
        "excludeArtifactsWithTag": {
            "type": "array",
            "title": "Exclude any artifacts that have the following tags",
            "items": {
                "type": "string"
            }
        },
        "excludePackageDependencies": {
            "type": "array",
            "title": "Exclude the below external package dependencies while creating a release definition",
            "items": {
                "type": "string"
            }
        },
        "excludeAllPackageDependencies": {
            "type": "boolean",
            "title": "Exclude all external package dependencies while creating a release definition"
        },
        "includeOnlyPackageDependencies": {
            "type": "array",
            "title": "Include only the below external package dependencies while creating a release definition",
            "items": {
                "type": "string"
            }
        },
        "dependencyOn": {
            "type": "array",
            "title": "Include the below artifacts as dependencies of this release definition,usefor for validation",
            "items": {
                "type": "string"
            }
        },
        "releasedefinitionProperties":{
            "type": "object",
            "title": "Properties that need to be set in the generated definition file",
            "additionalProperties": true,
            "properties": {
            "skipIfAlreadyInstalled": {
                "type": "boolean"
            },
            "skipArtifactUpdate": {
                "type": "boolean"
            },
            "baselineOrg": {
                "type": "string"
            },
            "promotePackagesBeforeDeploymentToOrg": {
                "type": "string"
            },
            "changelog": {
                "type": "object",
                "properties": {
                    "workItemFilters": {
                        "type": "array",
                        "title": "Regex to filter workitems from commit messages",
                        "items": {
                            "type": "string"
                        }
                    },
                    "workItemUrl": {
                        "type": "string"
                    },
                    "limit": {
                        "type": "integer"
                    },
                    "showAllArtifacts": {
                        "type": "boolean"
                    }
                },
                "required": ["workItemFilters"],
                "additionalProperties": false
            }
        }
     }
   }
}
