{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Storage Configuration",
    "description": "Configuration for storage. The storage is used to store the images when save function is called. One storage serves every camera module; without unifiedStorage each module gets a subfolder of its own (its module id).",
    "type": "object",
    "properties": {
        "type": {
            "type": "string",
            "enum": [
                "Null",
                "Internal"
            ],
            "description": "Null: no storage, save does nothing. Internal: a folder of the device the Cam Driver runs on."
        }
    },
    "oneOf": [
        {
            "properties": {
                "type": {
                    "enum": [
                        "Null"
                    ],
                    "description": "The storage is disabled."
                }
            }
        },
        {
            "properties": {
                "type": {
                    "enum": [
                        "Internal"
                    ],
                    "description": "A folder of the device the Cam Driver runs on."
                },
                "parameters": {
                    "type": "object",
                    "properties": {
                        "rootPath": {
                            "type": "string",
                            "minLength": 1,
                            "description": "The root path of the internal storage. A relative path is resolved against the folder of the application settings file (lumiscan-cam-driver.json).",
                            "examples": [
                                "images",
                                "/media/sdb1/myCapturedImages"
                            ]
                        }
                    }
                }
            }
        }
    ],
    "required": [
        "type"
    ],
    "examples": [
        {
            "type": "Internal",
            "parameters": {
                "rootPath": "images"
            }
        },
        {
            "type": "Null"
        }
    ]
}
