{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/hooks/v1/create-hook-request.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Definition of a hook that can create tasks at defined times.\n",
  "properties": {
    "bindings": {
      "$ref": "bindings.json#"
    },
    "hookGroupId": {
      "maxLength": 1000,
      "minLength": 1,
      "pattern": "^([a-zA-Z0-9-_]*)$",
      "type": "string"
    },
    "hookId": {
      "maxLength": 1000,
      "minLength": 1,
      "pattern": "^([a-zA-Z0-9-_/]*)$",
      "type": "string"
    },
    "metadata": {
      "$ref": "hook-metadata.json#"
    },
    "schedule": {
      "default": [],
      "description": "Definition of the times at which a hook will result in creation of a task.\nIf several patterns are specified, tasks will be created at any time\nspecified by one or more patterns.\n",
      "items": {
        "description": "Cron-like specification for when tasks should be created.  The pattern is\nparsed in a UTC context.\nSee [cron-parser on npm](https://www.npmjs.com/package/cron-parser).\nNote that tasks may not be created at exactly the time specified.\n",
        "title": "Cron Pattern",
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "task": {
      "description": "Template for the task definition.  This is rendered using [JSON-e](https://json-e.js.org/)\nas described in [firing hooks](/docs/reference/core/hooks/firing-hooks) to produce\na task definition that is submitted to the Queue service.\n",
      "title": "Task Template",
      "type": "object"
    },
    "triggerSchema": {
      "default": {
        "additionalProperties": false,
        "type": "object"
      },
      "type": "object"
    }
  },
  "required": [
    "metadata",
    "task"
  ],
  "title": "Hook creation request",
  "type": "object"
}