{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fortrabbit-com/json-schema/fortrabbit-com-environment-environment-update-api-request-json-merge-patch-schema.json",
  "title": "Environment.EnvironmentUpdateApiRequest.jsonMergePatch",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/fortrabbit-com-api-openapi.json#/components/schemas/Environment.EnvironmentUpdateApiRequest.jsonMergePatch",
  "type": "object",
  "properties": {
    "name": {
      "minLength": 3,
      "maxLength": 32,
      "pattern": "^([a-z0-9]([a-z0-9-]*[a-z0-9])?)$",
      "type": [
        "string",
        "null"
      ],
      "description": "New environment name. Omit to leave unchanged."
    },
    "git": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "branch": {
          "type": "string",
          "maxLength": 255
        },
        "directory": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 255
        }
      },
      "additionalProperties": false,
      "required": [
        "branch"
      ],
      "description": "Git configuration. When present, replaces the environment's branch and source directory."
    },
    "buildCommands": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Replaces the environment's build commands. Omit to leave unchanged; send [] to clear."
    },
    "postDeployCommands": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Replaces the environment's post-deploy commands. Omit to leave unchanged; send [] to clear."
    },
    "phpVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "PHP runtime version. Setting it stops the environment from being auto-updated to newer PHP versions. Omit to leave unchanged."
    },
    "environmentVariables": {
      "type": [
        "object",
        "null"
      ],
      "description": "Add or change a variable by sending its name with a string value. Remove a variable by sending its name with a null value. Variables you do not name are left unchanged; omit the field entirely to change nothing. Platform-injected variables cannot be added, changed or removed.",
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      }
    }
  }
}