{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/portainer/main/json-schema/portainer-customtemplates-custom-template-from-git-repository-payload-schema.json",
  "title": "customtemplates.customTemplateFromGitRepositoryPayload",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/portainer-custom-templates-api-openapi.yml#/components/schemas/customtemplates.customTemplateFromGitRepositoryPayload",
  "properties": {
    "ComposeFilePathInRepository": {
      "default": "docker-compose.yml",
      "description": "Path to the Stack file inside the Git repository",
      "type": "string"
    },
    "Description": {
      "description": "Description of the template",
      "type": "string"
    },
    "EdgeTemplate": {
      "description": "EdgeTemplate indicates if this template purpose for Edge Stack",
      "type": "boolean"
    },
    "IsComposeFormat": {
      "description": "IsComposeFormat indicates if the Kubernetes template is created from a Docker Compose file",
      "type": "boolean"
    },
    "Logo": {
      "description": "URL of the template's logo",
      "type": "string"
    },
    "Note": {
      "description": "A note that will be displayed in the UI. Supports HTML content",
      "type": "string"
    },
    "Platform": {
      "allOf": [
        {
          "$ref": "#/$defs/portainer.CustomTemplatePlatform"
        }
      ],
      "description": "Platform associated to the template.\nValid values are: 1 - 'linux', 2 - 'windows'\nRequired for Docker stacks",
      "enum": [
        1,
        2
      ]
    },
    "RepositoryAuthentication": {
      "description": "Use basic authentication to clone the Git repository",
      "type": "boolean"
    },
    "RepositoryPassword": {
      "description": "Password used in basic authentication. Required when RepositoryAuthentication is true.",
      "type": "string"
    },
    "RepositoryReferenceName": {
      "description": "Reference name of a Git repository hosting the Stack file",
      "type": "string"
    },
    "RepositoryURL": {
      "description": "URL of a Git repository hosting the Stack file",
      "type": "string"
    },
    "RepositoryUsername": {
      "description": "Username used in basic authentication. Required when RepositoryAuthentication is true.",
      "type": "string"
    },
    "TLSSkipVerify": {
      "description": "TLSSkipVerify skips SSL verification when cloning the Git repository",
      "type": "boolean"
    },
    "Title": {
      "description": "Title of the template",
      "type": "string"
    },
    "Type": {
      "allOf": [
        {
          "$ref": "#/$defs/portainer.StackType"
        }
      ],
      "description": "Type of created stack:\n* 1 - swarm\n* 2 - compose\n* 3 - kubernetes",
      "enum": [
        1,
        2
      ]
    },
    "Variables": {
      "description": "Definitions of variables in the stack file",
      "items": {
        "$ref": "#/$defs/portainer.CustomTemplateVariableDefinition"
      },
      "type": "array"
    }
  },
  "required": [
    "Description",
    "RepositoryURL",
    "Title",
    "Type"
  ],
  "type": "object",
  "$defs": {
    "portainer.CustomTemplatePlatform": {
      "enum": [
        0,
        1,
        2
      ],
      "type": "integer",
      "x-enum-varnames": [
        "_",
        "CustomTemplatePlatformLinux",
        "CustomTemplatePlatformWindows"
      ]
    },
    "portainer.CustomTemplateVariableDefinition": {
      "properties": {
        "defaultValue": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "portainer.StackType": {
      "enum": [
        0,
        1,
        2,
        3
      ],
      "type": "integer",
      "x-enum-varnames": [
        "_",
        "DockerSwarmStack",
        "DockerComposeStack",
        "KubernetesStack"
      ]
    }
  }
}