{
    "title": "Get user profile reply",
    "description": "Get all information about a user's profile",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://api.nextpertise.nl/schemas/user/get_profile_reply_v1.json",
    "type": "object",
    "properties": {
        "user": {
            "type": "object",
            "required": [
                "language",
                "firstname",
                "lastname",
                "username"
            ],
            "properties": {
                "language": {
                    "description": "Enum options:<pre class=\"empty-params-pre\">en-US|nl-NL</pre>. IETF BCP 47 language tag",
                    "type": "string",
                    "enum": [
                        "en-US",
                        "nl-NL"
                    ]
                },
                "firstname": {
                    "type": "string"
                },
                "lastname": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                },
                "timezone": {
                    "type": "string"
                }
            }
        },
        "notification": {
            "type": "array"
        },
        "security": {
            "type": "object",
            "description": "Object containing security options.",
            "properties": {
                "totp_enabled": {
                    "type": "boolean",
                    "description": "Whether or not TOTP based 2FA is enabled."
                },
                "whitelist": {
                    "type": "array",
                    "description": "List of whitelisted IPs.",
                    "items": {
                        "type": "object",
                        "properties": {
                            "subnet": {
                                "oneOf": [
                                    {
                                        "title": "IPv4 address",
                                        "description": "IP Address in CIDR notation.",
                                        "type": [
                                            "string",
                                            "one of"
                                        ],
                                        "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"
                                    },
                                    {
                                        "title": "IPv6 address",
                                        "description": "The IPv6 address assigned to this circuit in CIDR format",
                                        "type": [
                                            "string",
                                            "one of"
                                        ],
                                        "pattern": "^(((?:(?:(?:[0-9a-fA-F]){1,4})?):){1,7}(?:(?:(?:[0-9a-fA-F]){1,4})?))(/(1[0-1][0-9]|12[0-8]|[1-9][0-9]|[1-9]))?$"
                                    }
                                ],
                                "type": "one of"
                            },
                            "description": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "roles": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "user",
        "notification",
        "security",
        "roles"
    ]
}