{
    "$ref": "#/definitions/OptionsArraySchema",
    "definitions": {
        "Config.Options_Auth": {
            "additionalProperties": false,
            "properties": {
                "$element": {
                    "description": "Only allow requests using these authAccounts. Option elements affect the group they belong to and all children under that. Each property in an auth element replaces the key from parent auth elements.\n\nAnonymous requests are ALWAYS denied if an auth list applies to the requested path. \n\nNote that this does not change server authentication procedures. Data folders are always given the authenticated username regardless of whether there are auth elements in the tree.",
                    "enum": [
                        "auth"
                    ],
                    "type": "string"
                },
                "authError": {
                    "description": "Which error code to return for unauthorized (or anonymous) requests\n- 403 Access Denied: Client is not granted permission to access this resouce.\n- 404 Not Found: Client is told that the resource does not exist.",
                    "enum": [
                        403,
                        404
                    ],
                    "type": "number"
                },
                "authList": {
                    "anyOf": [
                        {
                            "items": {
                                "type": "string"
                            },
                            "type": "array"
                        },
                        {
                            "type": "null"
                        }
                    ],
                    "description": "Array of keys from authAccounts object that can access this resource. Null allows all, including anonymous."
                }
            },
            "required": [
                "$element"
            ],
            "type": "object"
        },
        "Config.Options_Backups": {
            "additionalProperties": false,
            "properties": {
                "$element": {
                    "description": "Options related to backups for single-file wikis. Option elements affect the group they belong to and all children under that. Each property in a backups element replaces the key from parent backups elements.",
                    "enum": [
                        "putsaver"
                    ],
                    "type": "string"
                },
                "backupFolder": {
                    "description": "Backup folder to store backups in. Multiple folder paths can backup to the same folder if desired.",
                    "type": "string"
                },
                "enabled": {
                    "description": "If false, disables the put saver globally",
                    "type": "boolean"
                },
                "etag": {
                    "description": "Whether to use the etag field -- if not specified then it will check it if presented.\nThis does not affect the backup etagAge option, as the saving mechanism will still \nsend etags back to the browser, regardless of this option.",
                    "enum": [
                        "required",
                        "disabled",
                        "optional"
                    ],
                    "type": "string"
                },
                "etagAge": {
                    "description": "Reject an etag with a modified time that is different than the file on disk by this many seconds. \n Sometimes sync or antivirus sofware will \"touch\" a file and update the modified time without changing anything.\n Size difference will still cause the request to be rejected.",
                    "type": "number"
                },
                "gzipBackups": {
                    "description": "GZip backup file to save disk space. Good for larger wikis. Turn this off for experimental wikis that you often need to restore from a backup because of a bad line of code (I speak from experience).",
                    "type": "boolean"
                }
            },
            "required": [
                "$element",
                "backupFolder",
                "enabled",
                "etag",
                "etagAge",
                "gzipBackups"
            ],
            "type": "object"
        },
        "Config.Options_Index": {
            "additionalProperties": false,
            "properties": {
                "$element": {
                    "description": "Options related to the directory index (request paths that resolve to a folder\nwhich is not a data folder). Option elements affect the group\nthey belong to and all children under that. Each property in an option element \nreplaces the key from parent option elements.",
                    "enum": [
                        "index"
                    ],
                    "type": "string"
                },
                "defaultType": {
                    "description": "The format of the index generated if no index file is found, or \"403\" to \nreturn a 403 Access Denied, or 404 to return a 404 Not Found. 403 is the \nerror code used by Apache and Nginx.",
                    "enum": [
                        "html",
                        "json",
                        403,
                        404
                    ],
                    "type": [
                        "string",
                        "number"
                    ]
                },
                "indexExts": {
                    "description": "Extensions to add when looking for an index file. A blank string will set the order \nto search for the exact indexFile name. The extensions are searched in the order specified. \n\nOnly applies to folder elements, but may be set on a group element. An empty array disables this feature.\nThe default is `[\"\"]`, which will search for an exact indexFile.",
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "indexFile": {
                    "description": "Look for index files named exactly this or with one of the defaultExts added. \nFor example, a defaultFile of [\"index\"] and a defaultExts of [\"htm\",\"\",html\"] would \nlook for [\"index.htm\",\"index\",\"index.html\"] in that order. \n\nOnly applies to folder elements, but may be set on a group element. An empty array disables this feature.\nTo use a .hidden file, put the full filename here, and set indexExts to `[\"\"]`.",
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "required": [
                "$element"
            ],
            "type": "object"
        },
        "OptionsArraySchema": {
            "description": "The options array schema is in `settings-2-1-tree-options.schema.json`",
            "items": {
                "anyOf": [
                    {
                        "$ref": "#/definitions/Config.Options_Auth"
                    },
                    {
                        "$ref": "#/definitions/Config.Options_Backups"
                    },
                    {
                        "$ref": "#/definitions/Config.Options_Index"
                    }
                ]
            },
            "type": "array"
        }
    }
}