{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Task Schema",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "task",
        "status"
    ],
    "properties": {
        "_id": {
            "type": "string",
            "description": "Unique identifier for this archetype record",
            "maxLength": 50,
            "default": ""
        },
        "draft": {
            "type": "boolean",
            "description": "Indicates this archetype record is a draft and is not published",
            "default": false
        },
        "created": {
            "type": "string",
            "description": "Date and time this archetype record was created in ISO 8601 date standard e.g. YYYY-MM-DDThh:mm:ss.sTZD",
            "format": "date-time",
            "default": ""
        },
        "updated": {
            "type": "string",
            "description": "Date and time this archetype record was updated in ISO 8601 date standard e.g. YYYY-MM-DDThh:mm:ss.sTZD",
            "format": "date-time",
            "default": ""
        },
        "task": {
            "type": "string",
            "description": "The task",
            "maxLength": 4000,
            "default": ""
        },
        "status": {
            "enum": [
                "not completed",
                "completed",
                "on hold"
            ],
            "description": "Three options in string format to describe status of the task",
            "default": "not completed"
        },
        "list": {
            "type": "string",
            "description": "The list this task belongs to",
            "maxLength": 300,
            "default": ""
        },
        "parent_task": {
            "type": "string",
            "description": "ID of another task that this task belongs to",
            "maxLength": 100,
            "default": ""
        },
        "category": {
            "type": "string",
            "description": "Category for the task",
            "maxLength": 50,
            "default": ""
        },
        "due_date": {
            "type": "string",
            "description": "Date and time the task is due in ISO 8601 date standard e.g. YYYY-MM-DDThh:mm:ss.sTZD",
            "format": "date-time",
            "default": ""
        },
        "priority_level": {
            "type": "integer",
            "description": "Priority level.  5 being the most important",
            "minimum": 1,
            "maximum": 5,
            "default": 1
        },
        "percentage_completed": {
            "type": "integer",
            "description": "Number out of 100 to represent how much of this task has been completed",
            "minimum": 0,
            "maximum": 100,
            "default": 0
        },
        "assignees": {
            "type": "array",
            "description": "People whom this task has been assigned to",
            "maxItems": 30,
            "_uniqueItems": true,
            "additionalItems": false,
            "default": [],
            "items": {
                "type": "string",
                "default": ""
            }
        }
    }
}