{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Users",
    "type": "object",
    "properties": {
        "admin": {
            "type": "boolean"
        },
        "firstName": {
            "type": "string"
        },
        "lastName": {
            "type": "string"
        },
        "login": {
            "type": "string"
        },
        "password": {
            "type": "string",
            "minLength": 12
        },
        "emailAddresses": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "phoneNumbers": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "permissions": {
            "type": "object",
            "properties": {
                "tags": {
                    "type": "object",
                    "properties": {
                        "^\\w+{24}$": {
                            "mode": {
                                "type": "string",
                                "enum": [
                                    "read"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "required": [
        "admin",
        "firstName",
        "lastName",
        "login",
        "password",
        "emailAddresses",
        "phoneNumbers"
    ]
}