-
Notifications
You must be signed in to change notification settings - Fork 180
/
features.schema.json
83 lines (83 loc) · 3.24 KB
/
features.schema.json
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/WebAssembly/website/raw/main/features.schema.json",
"title": "WebAssembly feature table",
"type": "object",
"definitions": {
"feature-info": {
"type": "object",
"properties": {
"description": { "type": "string" },
"url": { "type": "string", "format": "uri-reference" },
"phase": {
"anyOf": [
{ "type": "integer", "minimum": 1 },
{ "const": "deprecated" }
]
}
},
"additionalProperties": false,
"required": ["description", "url", "phase"]
},
"browser-features": {
"type": "object",
"properties": {
"url": { "type": "string", "format": "uri" },
"logo": { "type": "string", "format": "uri-reference" },
"features": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/status" }
}
},
"additionalProperties": false,
"required": ["url", "logo", "features"]
},
"status": {
"title": "Status of this feature",
"anyOf": [
{ "$ref": "#/definitions/status-na" },
{ "$ref": "#/definitions/status-supported" },
{ "$ref": "#/definitions/status-unsupported" },
{ "$ref": "#/definitions/status-flag" },
{ "$ref": "#/definitions/status-version" },
{ "$ref": "#/definitions/status-note" }
]
},
"status-na": { "type": "null", "title": "Not applicable" },
"status-supported": { "const": true, "title": "Supported in unknown version" },
"status-unsupported": { "const": false, "title": "Unsupported" },
"status-flag": { "const": "flag", "title": "Flag required" },
"status-version": { "type": "string", "title": "Supported in this version", "minLength": 1 },
"status-note": {
"type": "array",
"items": [
{
"anyOf": [
{ "$ref": "#/definitions/status-na" },
{ "$ref": "#/definitions/status-supported" },
{ "$ref": "#/definitions/status-unsupported" },
{ "$ref": "#/definitions/status-flag" },
{ "$ref": "#/definitions/status-version" }
]
},
{ "type": "string", "title": "Attached note", "minLength": 1 }
],
"additionalItems": false,
"minItems": 2,
"maxItems": 2
}
},
"properties": {
"$schema": { "type": "string", "format": "uri-reference" },
"features": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/feature-info" }
},
"browsers": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/browser-features" }
}
},
"additionalProperties": false,
"required": ["features", "browsers"]
}