{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-policy-update-request-schema.json",
  "title": "PolicyUpdateRequest",
  "description": "Request body for updating a policy.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-policy-engine-api-openapi.yml#/components/schemas/PolicyUpdateRequest",
  "properties": {
    "condition": {
      "anyOf": [
        {
          "$ref": "#/$defs/PolicyConditionRequest"
        },
        {
          "type": "null"
        }
      ],
      "description": "Condition for when this policy applies."
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Human-readable description of the policy.",
      "title": "Description"
    },
    "guardrails_add": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "List of guardrail names to add.",
      "title": "Guardrails Add"
    },
    "guardrails_remove": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "description": "List of guardrail names to remove (from inherited).",
      "title": "Guardrails Remove"
    },
    "inherit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Name of parent policy to inherit from.",
      "title": "Inherit"
    },
    "pipeline": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional guardrail pipeline for ordered execution. Contains 'mode' and 'steps'.",
      "title": "Pipeline"
    },
    "policy_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "New name for the policy.",
      "title": "Policy Name"
    }
  },
  "type": "object",
  "$defs": {
    "PolicyConditionRequest": {
      "description": "Condition for when a policy applies.",
      "properties": {
        "model": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Model name pattern (exact match or regex) for when policy applies.",
          "title": "Model"
        }
      },
      "title": "PolicyConditionRequest",
      "type": "object"
    }
  }
}