{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "definitions": {
    "git": {
      "type": "object",
      "required": [
        "type",
        "repository"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "git"
          ]
        },
        "repository": {
          "type": "string"
        },
        "checkout": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "docker": {
      "type": "object",
      "required": [
        "type",
        "registry",
        "image"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "docker"
          ]
        },
        "image": {
          "type": "string"
        },
        "registry": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "local": {
      "type": "object",
      "required": [
        "type",
        "path"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "local"
          ]
        },
        "path": {
          "type": "string"
        }
      }
    },
    "docker_component_source": {
      "oneOf": [
        {
          "$ref": "#/definitions/git"
        },
        {
          "$ref": "#/definitions/docker"
        },
        {
          "$ref": "#/definitions/local"
        }
      ]
    }
  }
}