{
  "description": "TestSource is the Schema for the testsources 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": "TestSourceSpec defines the desired state of TestSource",
      "properties": {
        "data": {
          "description": "test content body",
          "type": "string"
        },
        "repository": {
          "description": "repository of test content",
          "properties": {
            "authType": {
              "description": "auth type for git requests",
              "enum": [
                "basic",
                "header"
              ],
              "type": "string"
            },
            "branch": {
              "description": "branch/tag name for checkout",
              "type": "string"
            },
            "certificateSecret": {
              "description": "git auth certificate secret for private repositories",
              "type": "string"
            },
            "commit": {
              "description": "commit id (sha) for checkout",
              "type": "string"
            },
            "path": {
              "description": "If specified, does a sparse checkout of the repository at the given path",
              "type": "string"
            },
            "tokenSecret": {
              "description": "SecretRef is the Testkube internal reference for secret storage in Kubernetes secrets",
              "properties": {
                "key": {
                  "description": "object key",
                  "type": "string"
                },
                "name": {
                  "description": "object name",
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "type": {
              "description": "VCS repository type",
              "type": "string"
            },
            "uri": {
              "description": "uri of content file or git directory",
              "type": "string"
            },
            "usernameSecret": {
              "description": "SecretRef is the Testkube internal reference for secret storage in Kubernetes secrets",
              "properties": {
                "key": {
                  "description": "object key",
                  "type": "string"
                },
                "name": {
                  "description": "object name",
                  "type": "string"
                }
              },
              "required": [
                "key",
                "name"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "workingDir": {
              "description": "if provided we checkout the whole repository and run test from this directory",
              "type": "string"
            }
          },
          "required": [
            "type",
            "uri"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "type": {
          "enum": [
            "string",
            "file-uri",
            "git-file",
            "git-dir",
            "git"
          ],
          "type": "string"
        },
        "uri": {
          "description": "uri of test content",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "TestSourceStatus defines the observed state of TestSource",
      "type": "object"
    }
  },
  "type": "object"
}
