{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tuqo-ru/json-schema/tuqo-ru-site-git-schema.json",
  "title": "SiteGit",
  "description": "Site repository connection (`shared::model::SiteGit`; secrets are not returned).",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tuqo-ru-openapi.json#/components/schemas/SiteGit",
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "format": "uuid"
    },
    "provider": {
      "type": "string",
      "description": "`generic` for connections made via REST; `github`, `gitlab`, `gitea`, `gitverse` or `gitflic` for sites connected in the dashboard."
    },
    "clone_url": {
      "type": "string"
    },
    "branch": {
      "type": "string"
    },
    "auth_user": {
      "type": [
        "string",
        "null"
      ]
    },
    "connection_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "install_command": {
      "type": [
        "string",
        "null"
      ]
    },
    "build_command": {
      "type": [
        "string",
        "null"
      ]
    },
    "output_dir": {
      "description": "Build output folder inside the project (relative to root_dir, or to the repository root when root_dir is empty): no leading /, no .., no backslash. It must contain index.html (or TanStack Start's _shell.html, which becomes index.html); otherwise the deploy fails and the previous version, if any, stays live. Empty: auto-detect (dist, dist/client, build, build/client, out, .vitepress/dist, .output/public, _site, site, storybook-static, public as a fallback), preferring the first folder with a home page.",
      "type": [
        "string",
        "null"
      ]
    },
    "root_dir": {
      "description": "Project subfolder inside the repository (monorepo), relative to the repository root: no leading /, no .., no backslash. Empty: the repository root.",
      "type": [
        "string",
        "null"
      ]
    },
    "auto_deploy": {
      "type": "boolean"
    },
    "preview_enabled": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "site_id",
    "provider",
    "clone_url",
    "branch",
    "auth_user",
    "connection_id",
    "install_command",
    "build_command",
    "output_dir",
    "root_dir",
    "auto_deploy",
    "preview_enabled",
    "created_at",
    "updated_at"
  ]
}