{
    "additionalProperties": false,
    "description": "Schema for an Iglu resolver's configuration",
    "properties": {
        "cacheSize": {
            "minimum": 0,
            "type": "integer"
        },
        "repositories": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "connection": {
                        "oneOf": [
                            {
                                "additionalProperties": false,
                                "properties": {
                                    "embedded": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "path": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "path"
                                        ],
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "embedded"
                                ]
                            },
                            {
                                "additionalProperties": false,
                                "properties": {
                                    "http": {
                                        "additionalProperties": false,
                                        "properties": {
                                            "apikey": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "uri": {
                                                "_format": "uri",
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "uri"
                                        ],
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "http"
                                ]
                            }
                        ],
                        "type": "object"
                    },
                    "name": {
                        "type": "string"
                    },
                    "priority": {
                        "type": "integer"
                    },
                    "vendorPrefixes": {
                        "items": {
                            "type": "string"
                        },
                        "type": "array"
                    }
                },
                "required": [
                    "name",
                    "priority",
                    "vendorPrefixes",
                    "connection"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "cacheSize",
        "repositories"
    ],
    "self": {
        "format": "jsonschema",
        "name": "resolver-config",
        "vendor": "com.snowplowanalytics.iglu",
        "version": "1-0-1"
    },
    "type": "object"
}