1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://variants-schema.wheelnext.dev/peps/825/v0.1.1.json",
4 "title": "Variant metadata, v0.1.1",
5 "description": "The format for variant metadata (variant.json) and index-level metadata ({name}-{version}-variants.json)",
6 "type": "object",
7 "properties": {
8 "$schema": {
9 "description": "JSON schema URL",
10 "type": "string"
11 },
12 "default-priorities": {
13 "description": "Default priorities for ordering variants",
14 "type": "object",
15 "properties": {
16 "namespace": {
17 "description": "Namespaces (in order of preference)",
18 "type": "array",
19 "items": {
20 "type": "string",
21 "pattern": "^[a-z0-9_]+$"
22 },
23 "minItems": 1,
24 "uniqueItems": true
25 }
26 },
27 "additionalProperties": false,
28 "required": [
29 "namespace"
30 ]
31 },
32 "variants": {
33 "description": "Mapping of variant labels to properties",
34 "type": "object",
35 "patternProperties": {
36 "^[a-z0-9_.]+$": {
37 "type": "object",
38 "description": "Mapping of namespaces in a variant",
39 "patternProperties": {
40 "^[a-z0-9_]+$": {
41 "description": "Mapping of feature names in a namespace",
42 "type": "object",
43 "patternProperties": {
44 "^[a-z0-9_]+$": {
45 "description": "List of values for this variant feature",
46 "type": "array",
47 "items": {
48 "type": "string",
49 "pattern": "^[a-z0-9_.]+$"
50 },
51 "minItems": 1,
52 "uniqueItems": true
53 }
54 },
55 "additionalProperties": false
56 }
57 },
58 "additionalProperties": false
59 }
60 },
61 "additionalProperties": false
62 }
63 },
64 "required": [
65 "$schema",
66 "default-priorities",
67 "variants"
68 ],
69 "additionalProperties": false
70}