summaryrefslogtreecommitdiffstats
path: root/schema.json
blob: 4c3cd63eee43d782cf8f3c36d7585af25ab602ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "schema for the Tails HTTP mirror pool",
    "type": "object",
    "required": [ "version", "mirrors" ],
    "additionalProperties": false,
    "properties": {
	"version": {
	    "type": "integer",
	    "minimum": 0
	},
        "mirrors": {
            "type": "array",
            "items": {
                "type": "object",
                "oneOf": [
                    { "$ref": "#/definitions/mirror" }
                ]
            },
            "uniqueItems": true,
	    "minItems": 1
        }
    },
    "definitions": {
        "mirror": {
	    "type": "object",
	    "properties": {
		"url_prefix": {
		    "type": "string",
		    "pattern": "^https://.*/$"
		},
		"weight": {
		    "type": "integer",
		    "minimum": 0
		},
		"email": {
		    "type": "string",
		    "format": "email"
		},
		"notes": {
		    "type": "string"
		}
	    },
	    "required": ["url_prefix", "weight"],
	    "additionalProperties": false
	}
    }
}