{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/bosh-deploy-config.json",
  "$comment": "This schema was built from information on https://bosh.io/docs/deploy-config/ and https://github.com/cloudfoundry/bosh-cli/pull/634.",
  "$ref": "#/definitions/DeployConfig",
  "definitions": {
    "DeployConfig": {
      "type": "object",
      "title": "BOSH CLI Deploy Config",
      "description": "A config to enable `bosh deploy` flags on a BOSH Director-wide or per-deployment basis.",
      "anyOf": [
        {
          "additionalProperties": false,
          "required": ["flags"],
          "properties": {
            "flags": {
              "$ref": "#/definitions/Flags"
            },
            "exclude": {
              "$ref": "#/definitions/Deployments"
            }
          }
        },
        {
          "additionalProperties": false,
          "required": ["flags"],
          "properties": {
            "flags": {
              "$ref": "#/definitions/Flags"
            },
            "include": {
              "$ref": "#/definitions/Deployments"
            }
          }
        }
      ]
    },
    "Flags": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "regex",
        "pattern": "^(fix|fix-releases|recreate|recreate-persistent-disks)$"
      }
    },
    "Deployments": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
