{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://github.com/flxbl-io/json-schemas/blob/main/release-config.schema.json",
    "title": "Configuration of a release, used as an input to the release definition generator or by sfops for understanding how the repo is structure",
    "description": "Configuration of a release",
    "type": "object",
    "additionalProperties": true,
    "dependencies": {
        "baselineOrg": ["skipIfAlreadyInstalled"]
    },
    "properties": {
        "releaseName": {
            "type": "string",
            "title": "Name of the domain this release configuration belongs to"
        },
        "pool": {
            "type": "string",
            "title": "The pool of review sandbox or scratch org to be used for validating the packages that are part of this release configuration"
        },
        "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 release definition",
            "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
            }
        }
     }
   }
}
