{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/layero-ru/json-schema/layero-ru-build-context-schema.json",
  "title": "BuildContext",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/layero-ru-openapi.json#/components/schemas/BuildContext",
  "properties": {
    "deploy_id": {
      "type": "string",
      "format": "uuid",
      "title": "Deploy Id"
    },
    "project_id": {
      "type": "string",
      "format": "uuid",
      "title": "Project Id"
    },
    "environment_id": {
      "type": "string",
      "format": "uuid",
      "title": "Environment Id"
    },
    "repo_url": {
      "type": "string",
      "title": "Repo Url",
      "default": ""
    },
    "repo_full_name": {
      "type": "string",
      "title": "Repo Full Name",
      "default": ""
    },
    "commit_sha": {
      "type": "string",
      "title": "Commit Sha"
    },
    "branch_name": {
      "type": "string",
      "title": "Branch Name"
    },
    "build_cmd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Build Cmd"
    },
    "output_dir": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Dir"
    },
    "install_cmd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Install Cmd"
    },
    "start_cmd": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Cmd"
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Port"
    },
    "package_manager": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Package Manager"
    },
    "node_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Node Version"
    },
    "s3_path": {
      "type": "string",
      "title": "S3 Path"
    },
    "github_token": {
      "type": "string",
      "title": "Github Token",
      "default": ""
    },
    "source_token": {
      "type": "string",
      "title": "Source Token",
      "default": ""
    },
    "source_auth_user": {
      "type": "string",
      "title": "Source Auth User",
      "default": "x-access-token"
    },
    "source_provider": {
      "type": "string",
      "title": "Source Provider",
      "default": "github"
    },
    "source_plan": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Plan"
    },
    "env_vars": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Env Vars"
    },
    "farm_artifact": {
      "type": "boolean",
      "title": "Farm Artifact",
      "default": false
    },
    "farm_only": {
      "type": "boolean",
      "title": "Farm Only",
      "default": false
    },
    "layer_zstd": {
      "type": "boolean",
      "title": "Layer Zstd",
      "default": false
    },
    "project_type": {
      "type": "string",
      "title": "Project Type",
      "default": "spa"
    },
    "source_type": {
      "type": "string",
      "title": "Source Type",
      "default": "github"
    },
    "source_archive_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source Archive Key"
    },
    "framework_hint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Framework Hint"
    },
    "prebuilt": {
      "type": "boolean",
      "title": "Prebuilt",
      "default": false
    },
    "root_directory": {
      "type": "string",
      "title": "Root Directory",
      "default": ""
    },
    "first_build": {
      "type": "boolean",
      "title": "First Build",
      "default": false
    },
    "upload_variants": {
      "type": "boolean",
      "title": "Upload Variants",
      "default": true
    },
    "upload_pack": {
      "type": "boolean",
      "title": "Upload Pack",
      "default": false
    },
    "targets_production": {
      "type": "boolean",
      "title": "Targets Production",
      "default": true
    },
    "project_type_source": {
      "type": "string",
      "title": "Project Type Source",
      "default": "default"
    },
    "claimable": {
      "type": "boolean",
      "title": "Claimable",
      "default": false
    },
    "branding_enabled": {
      "type": "boolean",
      "title": "Branding Enabled",
      "default": true
    },
    "footer_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Footer Color"
    },
    "metrika_counter_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metrika Counter Id"
    },
    "metrika_webvisor": {
      "type": "boolean",
      "title": "Metrika Webvisor",
      "default": false
    },
    "instance_memory_mb": {
      "type": "integer",
      "title": "Instance Memory Mb",
      "default": 256
    },
    "instance_cpu_quota": {
      "type": "number",
      "title": "Instance Cpu Quota",
      "default": 0.5
    },
    "instance_tier": {
      "type": "string",
      "title": "Instance Tier",
      "default": "standard"
    },
    "fullstack_config": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fullstack Config"
    },
    "next_output_hint": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Output Hint"
    },
    "next_output_hint_scope": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Output Hint Scope"
    }
  },
  "type": "object",
  "required": [
    "deploy_id",
    "project_id",
    "environment_id",
    "commit_sha",
    "branch_name",
    "s3_path",
    "env_vars"
  ]
}