{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "additionalProperties": false,
  "definitions": {
    "dependency-type": {
      "type": "string",
      "enum": ["direct", "indirect", "all", "production", "development"],
      "x-intellij-enum-metadata": {
        "direct": {
          "description": "All explicitly defined dependencies."
        },
        "indirect": {
          "description": "Dependencies of direct dependencies (also known as sub-dependencies, or transient dependencies)."
        },
        "all": {
          "description": "All explicitly defined dependencies. For bundler, pip, composer, cargo, also the dependencies of direct dependencies."
        },
        "production": {
          "description": "Only dependencies in the 'Product dependency group'."
        },
        "development": {
          "description": "Only dependencies in the 'Development dependency group'."
        }
      }
    },
    "update-types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "version-update:semver-major",
          "version-update:semver-minor",
          "version-update:semver-patch"
        ]
      }
    },
    "insecure-external-code-execution": {
      "type": "string",
      "enum": ["allow", "deny"]
    },
    "versioning-strategy": {
      "type": "string",
      "enum": [
        "lockfile-only",
        "auto",
        "widen",
        "increase",
        "increase-if-necessary"
      ],
      "x-intellij-enum-metadata": {
        "lockfile-only": {
          "description": "Only create pull requests to update lockfiles updates. Ignore any new versions that would require package manifest changes."
        },
        "auto": {
          "description": "Follow the default strategy described above."
        },
        "widen": {
          "description": "Relax the version requirement to include both the new and old version, when possible."
        },
        "increase": {
          "description": "Always increase the version requirement to match the new version."
        },
        "increase-if-necessary": {
          "description": "Increase the version requirement only when required by the new version."
        }
      }
    },
    "package-ecosystem": {
      "type": "string",
      "enum": [
        "bundler",
        "cargo",
        "composer",
        "docker",
        "elm",
        "gitsubmodule",
        "github-actions",
        "gomod",
        "gradle",
        "maven",
        "mix",
        "npm",
        "nuget",
        "pip",
        "pub",
        "terraform"
      ]
    },
    "schedule-day": {
      "type": "string",
      "enum": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "sunday"
      ]
    },
    "schedule-interval": {
      "type": "string",
      "enum": ["daily", "weekly", "monthly"]
    },
    "update": {
      "type": "object",
      "properties": {
        "allow": {
          "description": "Customize which updates are allowed",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dependency-name": {
                "type": "string"
              },
              "dependency-type": {
                "$ref": "#/definitions/dependency-type"
              }
            }
          }
        },
        "assignees": {
          "description": "Assignees to set on pull requests",
          "type": "array",
          "items": {
            "type": "string"
          },
          "minimum": 1
        },
        "commit-message": {
          "description": "Commit message preferences",
          "type": "object",
          "properties": {
            "prefix": {
              "type": "string"
            },
            "prefix-development": {
              "type": "string"
            },
            "include": {
              "type": "string",
              "enum": ["scope"],
              "default": "scope"
            }
          }
        },
        "directory": {
          "description": "Location of package manifests",
          "type": "string",
          "default": "/"
        },
        "ignore": {
          "description": "Ignore certain dependencies or versions",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "dependency-name": {
                "type": "string"
              },
              "update-types": {
                "$ref": "#/definitions/update-types"
              },
              "versions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "insecure-external-code-execution": {
          "description": "Allow or deny code execution in manifest files",
          "$ref": "#/definitions/insecure-external-code-execution"
        },
        "labels": {
          "description": "Labels to set on pull requests",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": ["dependencies"]
        },
        "milestone": {
          "description": "Milestone to set on pull requests",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ]
        },
        "open-pull-requests-limit": {
          "description": "Limit number of open pull requests for version updates",
          "type": "integer",
          "default": 5
        },
        "package-ecosystem": {
          "description": "Package manager to use",
          "$ref": "#/definitions/package-ecosystem"
        },
        "pull-request-branch-name": {
          "description": "Pull request branch name preferences",
          "type": "object",
          "properties": {
            "separator": {
              "description": "Change separator for PR branch name",
              "type": "string",
              "default": "/",
              "enum": ["-", "_", "/"]
            }
          },
          "required": ["separator"]
        },
        "rebase-strategy": {
          "description": "Disable automatic rebasing",
          "type": "string",
          "enum": ["auto", "disabled"],
          "default": "auto"
        },
        "reviewers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Reviewers to set on pull requests",
          "minimum": 1
        },
        "schedule": {
          "description": "Schedule preferences",
          "type": "object",
          "properties": {
            "interval": {
              "$ref": "#/definitions/schedule-interval"
            },
            "day": {
              "$ref": "#/definitions/schedule-day",
              "description": "Specify an alternative day to check for updates"
            },
            "time": {
              "type": "string",
              "description": "Specify an alternative time of day to check for updates (format: hh:mm)"
            },
            "timezone": {
              "type": "string",
              "description": "The time zone identifier must be from the Time Zone database maintained by IANA",
              "default": "05:00 UTC"
            }
          }
        },
        "target-branch": {
          "type": "string",
          "description": "Branch to create pull requests against"
        },
        "vendor": {
          "description": "Update vendored or cached dependencies",
          "type": "boolean"
        },
        "versioning-strategy": {
          "description": "How to update manifest version requirements",
          "$ref": "#/definitions/versioning-strategy"
        }
      },
      "required": ["package-ecosystem", "directory", "schedule"]
    },
    "registry": {
      "type": "object",
      "title": "registries",
      "description": "The top-level registries key is optional. It allows you to specify authentication details that Dependabot can use to access private package registries.",
      "additionalProperties": false,
      "patternProperties": {
        ".*": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "type": {
              "description": "Identifies the type of registry.",
              "enum": [
                "composer-repository",
                "docker-registry",
                "git",
                "hex-organization",
                "hex-repository",
                "maven-repository",
                "npm-registry",
                "nuget-feed",
                "python-index",
                "rubygems-server",
                "terraform-registry"
              ]
            },
            "url": {
              "description": "The URL to use to access the dependencies in this registry. The protocol is optional. If not specified, https:// is assumed. Dependabot adds or ignores trailing slashes as required.",
              "type": "string"
            },
            "username": {
              "description": "The username that Dependabot uses to access the registry.",
              "type": "string"
            },
            "password": {
              "description": "A reference to a Dependabot secret containing the password for the specified user.",
              "type": "string"
            },
            "key": {
              "description": "A reference to a Dependabot secret containing an access key for this registry.",
              "type": "string"
            },
            "token": {
              "description": "A reference to a Dependabot secret containing an access token for this registry.",
              "type": "string"
            },
            "replaces-base": {
              "description": "For registries with type: python-index, if the boolean value is true, pip resolves dependencies by using the specified URL rather than the base URL of the Python Package Index (by default https://pypi.org/simple).",
              "type": "boolean"
            },
            "organization": {
              "description": "",
              "type": "string"
            },
            "repo": {
              "description": "",
              "type": "string"
            },
            "auth-key": {
              "description": "",
              "type": "string"
            },
            "public-key-fingerprint": {
              "description": "",
              "type": "string"
            }
          },
          "required": ["type"]
        }
      }
    }
  },
  "id": "https://json.schemastore.org/dependabot-2.0.json",
  "properties": {
    "version": {
      "anyOf": [
        {
          "type": "string",
          "default": "2"
        },
        {
          "type": "integer",
          "default": 2
        }
      ]
    },
    "enable-beta-ecosystems": {
      "description": "Enable ecosystems that have beta-level support",
      "type": "boolean"
    },
    "updates": {
      "type": "array",
      "items": {
        "title": "Package Ecosystem",
        "description": "Element for each one package manager that you want GitHub Dependabot to monitor for new versions",
        "$ref": "#/definitions/update"
      }
    },
    "registries": {
      "type": "object",
      "$ref": "#/definitions/registry"
    }
  },
  "required": ["version", "updates"],
  "title": "GitHub Dependabot v2 config",
  "type": "object"
}