{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/comp-ai/main/json-schema/comp-ai-update-policy-dto-schema.json",
  "title": "UpdatePolicyDto",
  "x-generated": "2026-10-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comp-ai-openapi.json#/components/schemas/UpdatePolicyDto",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the policy"
    },
    "description": {
      "type": "string",
      "description": "Description of the policy"
    },
    "status": {
      "type": "string",
      "description": "Status of the policy",
      "enum": [
        "draft",
        "published",
        "needs_review"
      ]
    },
    "content": {
      "type": "array",
      "description": "Content of the policy as TipTap JSON (array of nodes)",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "frequency": {
      "type": "string",
      "description": "Review frequency of the policy",
      "enum": [
        "monthly",
        "quarterly",
        "yearly"
      ]
    },
    "department": {
      "type": "string",
      "description": "Department this policy applies to. Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.",
      "maxLength": 64
    },
    "isRequiredToSign": {
      "type": "boolean",
      "description": "Whether this policy requires a signature"
    },
    "reviewDate": {
      "type": "string",
      "description": "Review date for the policy"
    },
    "assigneeId": {
      "type": "string",
      "description": "ID of the user assigned to this policy"
    },
    "approverId": {
      "type": "string",
      "description": "ID of the user who approved this policy"
    },
    "policyTemplateId": {
      "type": "string",
      "description": "ID of the policy template this policy is based on"
    },
    "signedBy": {
      "type": "array",
      "description": "List of user IDs who have signed this policy",
      "items": {
        "type": "string"
      }
    },
    "isArchived": {
      "type": "boolean",
      "description": "Whether to archive this policy"
    },
    "displayFormat": {
      "type": "string",
      "description": "Display format for this policy",
      "enum": [
        "EDITOR",
        "PDF"
      ]
    }
  }
}