{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anomalyarmor-ai/json-schema/anomalyarmor-ai-app-domains-feature-data-quality-models-schedules-create-schedule-request-schema.json",
  "title": "CreateScheduleRequest",
  "description": "Request model for creating check schedules.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anomalyarmor-ai-data-quality-api-openapi.yml#/components/schemas/app__domains__feature__data_quality__models__schedules__CreateScheduleRequest",
  "properties": {
    "table_path": {
      "type": "string",
      "maxLength": 500,
      "minLength": 1,
      "title": "Table Path",
      "description": "Full path to the table to monitor"
    },
    "check_type": {
      "$ref": "#/$defs/CheckType",
      "description": "Type of data quality check to perform"
    },
    "check_interval": {
      "type": "string",
      "pattern": "^(hourly|daily|weekly|monthly|\\d+[mhd]|@[a-z_]+|\\S+\\s+\\S+\\s+\\S+\\s+\\S+\\s+\\S+)$",
      "title": "Check Interval",
      "description": "How often to run the check (cron expression or human-readable)"
    },
    "enabled": {
      "type": "boolean",
      "title": "Enabled",
      "description": "Whether the schedule should be active immediately",
      "default": true
    },
    "check_config": {
      "additionalProperties": true,
      "type": "object",
      "title": "Check Config",
      "description": "Configuration specific to the check type"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Metadata",
      "description": "Additional metadata for the schedule"
    }
  },
  "type": "object",
  "required": [
    "table_path",
    "check_type",
    "check_interval",
    "check_config"
  ],
  "$defs": {
    "CheckType": {
      "type": "string",
      "enum": [
        "freshness",
        "statistical",
        "anomaly",
        "row_count",
        "consistency",
        "custom_sql"
      ],
      "title": "CheckType",
      "description": "Types of data quality checks."
    }
  }
}