{
    "type": "object",
    "version": "v2",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "Auspice config file to be supplied to `augur export v2`",
    "$comment": "This schema includes deprecated-but-handled-by-augur-export-v1 properties, but their schema definitions are somewhat incomplete",
    "additionalProperties": false,
    "required": [],
    "properties": {
        "title": {
            "description": "Title to be displayed in auspice",
            "type": "string"
        },
        "colorings": {
            "description": "Set traits to be available as color-dropdown options",
            "type": "array",
            "minItems": 1,
            "items": {
                "type": "object",
                "description": "An indiviual color-by for auspice",
                "additionalProperties": false,
                "required": [
                    "key"
                ],
                "properties": {
                    "key": {
                        "description": "They key used to access the value of this coloring on each node",
                        "type": "string"
                    },
                    "title": {
                        "description": "Text to be displayed in the \"color by\" dropdown and legends",
                        "$comment": "string is parsed unchanged by Auspice",
                        "type": "string"
                    },
                    "type": {
                        "description": "Defines how the color scale should be constructed",
                        "type": "string",
                        "enum": [
                            "continuous",
                            "ordinal",
                            "categorical",
                            "boolean"
                        ]
                    }
                }
            }
        },
        "color_options": {
            "description": "DEPRECATED v1 syntax for defining colorings",
            "deprecated": true,
            "type": "object"
        },
        "geo_resolutions": {
            "description": "Traits to be interpreted as 'geo resolution' options -- i.e. associated with lat/longs & made points on the map",
            "$comment": "Note that array entries can be different structures & you can mix & match",
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "oneOf": [
                    {
                        "type": "object",
                        "description": "An indiviual geo resolution",
                        "additionalProperties": false,
                        "required": [
                            "key"
                        ],
                        "properties": {
                            "key": {
                                "type": "string",
                                "description": "Trait key - must be specified on nodes (e.g. 'country')"
                            },
                            "title": {
                                "type": "string",
                                "description": "The title to display in the geo resolution dropdown. Optional -- if not provided then `key` will be used."
                            }
                        }
                    },
                    {
                        "type": "string",
                        "description": "An indiviual geo resolution key"
                    }
                ]
            }
        },
        "geo": {
            "description": "DEPRECATED v1 syntax for defining geo_resolutions",
            "deprecated": true,
            "type": "array"
        },
        "maintainers": {
            "description": "Who maintains this dataset?",
            "$comment": "order similar to a publication",
            "type": "array",
            "_uniqueItems": true,
            "minItems": 1,
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    }
                },
                "required": [
                    "name"
                ]
            }
        },
        "maintainer": {
            "description": "DEPRECATED v1 syntax for defining maintainers (but you could only define one!)",
            "deprecated": true,
            "type": "array"
        },
        "build_url": {
            "description": "URL with instructions to reproduce build, usually expected to be a GitHub repo URL",
            "$comment": "optional",
            "type": "string"
        },
        "filters": {
            "type": "array",
            "_uniqueItems": true,
            "minItems": 0,
            "items": {
                "type": "string"
            }
        },
        "display_defaults": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "map_triplicate": {
                    "type": "boolean"
                },
                "geo_resolution": {
                    "type": "string"
                },
                "color_by": {
                    "type": "string"
                },
                "distance_measure": {
                    "type": "string",
                    "enum": [
                        "num_date",
                        "div"
                    ]
                },
                "layout": {
                    "type": "string",
                    "enum": [
                        "rect",
                        "radial",
                        "unrooted",
                        "clock"
                    ]
                },
                "branch_label": {
                    "type": "string",
                    "enum": [
                        "clade",
                        "aa",
                        "none"
                    ]
                },
                "transmission_lines": {
                    "type": "boolean"
                }
            }
        },
        "defaults": {
            "description": "DEPRECATED v1 syntax for defining auspice view defaults",
            "deprecated": true,
            "type": "object"
        },
        "updated": {
            "description": "DEPRECATED v1 (or older) syntax for defining when the build was updated",
            "$comment": "unused in augur v6",
            "deprecated": true,
            "type": "string"
        },
        "panels": {
            "type": "array",
            "description": "Which panels should auspice display",
            "$comment": "optional",
            "minItems": 1,
            "items": {
                "type": "string",
                "enum": [
                    "tree",
                    "map",
                    "frequencies",
                    "entropy"
                ]
            }
        },
        "vaccine_choices": {
            "type": "object",
            "description": "UNUSED v1 syntax for defining vaccine choices",
            "$comment": "This is unused in `augur export v2` which gets vaccine info vis a node-data JSON file. It remains in the schema so that v1 config files can be used by `augur export v2`"
        }
    }
}