{
  "description": "Script is the Schema for the scripts API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ScriptSpec defines the desired state of Script",
      "properties": {
        "content": {
          "description": "script content object",
          "properties": {
            "data": {
              "description": "script content body",
              "type": "string"
            },
            "repository": {
              "description": "repository of script content",
              "properties": {
                "branch": {
                  "description": "branch/tag name for checkout",
                  "type": "string"
                },
                "path": {
                  "description": "if needed we can checkout particular path (dir or file) in case of BIG/mono repositories",
                  "type": "string"
                },
                "token": {
                  "description": "git auth token for private repositories",
                  "type": "string"
                },
                "type": {
                  "description": "VCS repository type",
                  "type": "string"
                },
                "uri": {
                  "description": "uri of content file or git directory",
                  "type": "string"
                },
                "username": {
                  "description": "git auth username for private repositories",
                  "type": "string"
                }
              },
              "required": [
                "branch",
                "type",
                "uri"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "type": {
              "description": "script type",
              "type": "string"
            },
            "uri": {
              "description": "uri of script content",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "name": {
          "description": "script execution custom name",
          "type": "string"
        },
        "params": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "execution params passed to executor",
          "type": "object"
        },
        "tags": {
          "description": "script tags",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "type": {
          "description": "script type",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ScriptStatus defines the observed state of Script",
      "properties": {
        "executions_count": {
          "type": "integer"
        },
        "last_execution": {
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
