{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "amended.schema.json",
  "title": "Principal Handoff Decisions 0.3: amended",
  "description": "Requester -> principal side: new terms for the item; terms_rev increases by one.",
  "$ref": "../../core/schemas/record.schema.json",
  "required": [
    "terms",
    "terms_rev"
  ],
  "properties": {
    "ext": {
      "const": "decisions/0.3"
    },
    "type": {
      "const": "amended"
    },
    "origin": {
      "const": "requester"
    },
    "terms": {
      "type": "object",
      "required": [
        "text"
      ],
      "properties": {
        "text": {
          "type": "string",
          "pattern": "\\S"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "label"
            ],
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^\\S{1,64}$"
              },
              "label": {
                "type": "string",
                "pattern": "\\S"
              }
            }
          }
        },
        "default": {
          "type": "string",
          "pattern": "\\S"
        },
        "due": {
          "type": "string",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
        }
      }
    }
  }
}
