{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.6/commands/task.upsert.schema.json",
  "$comment": "OpenEik 0.6: folded by tools/fold-schemas-0.6.mjs from the proposal workSchedules, which 0.6 makes a rule (open questions, 153). Written by hand, not generated.",
  "title": "task.upsert",
  "description": "Writes a task of a work schedule whole, under its id: a new one after the last of its parent's parts, else at the end of its schedule's tasks; one that is there in its place (Part XXII, 6, rule 3).",
  "type": "object",
  "properties": {
    "kind": {
      "const": "task.upsert"
    },
    "schedule": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^[^/\\s]+$",
      "description": "The schedule's id."
    },
    "task": {
      "$ref": "../project/work-schedules.schema.json#/$defs/task"
    },
    "expectedTask": {
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "description": "The task as read, whole; null in an envelope for a new one."
    }
  },
  "required": [
    "kind",
    "schedule",
    "task"
  ],
  "additionalProperties": false
}
