{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Outpack configuration schema",
    "description": "Common configuration settings. Implementations may add additional properties, but these are the core.",
    "version": "0.1.1",

    "type": "object",

    "properties": {
        "core": {
            "type": "object",
            "properties": {
                "path_archive": {
                    "type": ["null", "string"]
                },
                "use_file_store": {
                    "type": "boolean"
                },
                "require_complete_tree": {
                    "type": "boolean"
                },
                "hash_algorithm": {
                    "enum": ["md5", "sha1", "sha256", "sha384", "sha512"]
                }
            },
            "required": ["path_archive", "use_file_store", "hash_algorithm"],
            "additionalProperties": false
        },

        "location": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "args": {
                        "type": "object"
                    }
                },
                "required": ["name", "type", "args"]
            }
        }
    },

    "required": ["core", "location"]
}
