-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathfeatures.schema.json
More file actions
123 lines (123 loc) · 3.71 KB
/
features.schema.json
File metadata and controls
123 lines (123 loc) · 3.71 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"$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": "inactive" }
]
}
},
"additionalProperties": false,
"required": ["description", "url", "phase"]
},
"browser-features": {
"type": "object",
"properties": {
"url": { "type": "string", "format": "uri" },
"logo": { "type": "string", "format": "uri-reference" },
"logoClassName": { "type": "string" },
"category": {
"title": "Category this platform belongs to. If multiple, the first one will be considered primary",
"anyOf": [
{ "$ref": "#/definitions/category" },
{
"type": "array",
"items": { "$ref": "#/definitions/category" },
"minItems": 2,
"uniqueItems": true
}
]
},
"features": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/status" }
}
},
"additionalProperties": false,
"required": ["url", "category", "features"]
},
"category": {
"enum": [
"Web Browsers",
"Standalone Runtimes",
"Embedded Runtimes",
"Tools"
]
},
"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" }
},
"categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "$ref": "#/definitions/category" },
"queryKey": { "type": "string", "pattern": "^[\\w\\-\\.~]+$" },
"default": { "const": true }
},
"required": ["name", "queryKey"]
}
},
"browsers": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/browser-features" }
}
},
"additionalProperties": false,
"required": ["features", "browsers"]
}