{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UpdateScheduleContract",
  "title": "UpdateScheduleContract",
  "type": "object",
  "description": "Contract for fully updating a schedule (all required fields must be provided)",
  "required": [
    "workflowId",
    "ownerId",
    "iteration",
    "name",
    "comment",
    "workerTag",
    "credentialId"
  ],
  "properties": {
    "workflowId": {
      "type": "string",
      "example": "500123"
    },
    "ownerId": {
      "type": "string",
      "example": "500123"
    },
    "iteration": {
      "$ref": "#/components/schemas/ScheduleIteration"
    },
    "name": {
      "type": "string",
      "example": "Example Title"
    },
    "comment": {
      "type": "string",
      "example": "example_value"
    },
    "priority": {
      "type": "string",
      "enum": [
        "Low",
        "Medium",
        "High",
        "Critical"
      ],
      "default": "Low",
      "example": "Low"
    },
    "workerTag": {
      "type": "string",
      "example": "example_value"
    },
    "enabled": {
      "type": "boolean",
      "example": true
    },
    "credentialId": {
      "type": "string",
      "example": "500123"
    },
    "timeZone": {
      "type": "string",
      "example": "example_value"
    },
    "questions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "example": []
    }
  }
}