-
Notifications
You must be signed in to change notification settings - Fork 17
/
.mdn-spec-links.schema.json
279 lines (279 loc) · 8.84 KB
/
.mdn-spec-links.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/MDNSpecLink",
"definitions": {
"MDNSpecLink": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/Feature"
}
},
"description": "Each top-level entry in our data is an object with a single key: A\nfragment ID from a spec. Each top-level entry associates its spec\nfragment ID with one or more objects holding data about a feature."
},
"Feature": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the feature (interface, method, or property name); from BCD."
},
"filename": {
"type": [
"string",
"null"
],
"description": "Filename of the BCD file containing the data for the feature."
},
"title": {
"type": "string",
"description": "Title of the MDN article for the feature."
},
"slug": {
"type": "string",
"description": "Slug (URL path) of the MDN article for the feature."
},
"summary": {
"type": "string",
"description": "First paragraph or \"seoSummary\" of the MDN article for the feature."
},
"engines": {
"type": "array",
"items": {
"$ref": "#/definitions/Engines"
},
"description": "Names of engines with support for the feature that conforms to the\nspec (that is, un-prefixed and not under an alternative name —\nthough possibly requiring a runtime flag or preference to be set)."
},
"altname": {
"type": "array",
"items": {
"$ref": "#/definitions/Engines"
},
"description": "Names of engines with support for the feature implemented under a\nwholly different name (in contrast to just being prefixed)."
},
"needsflag": {
"type": "array",
"items": {
"$ref": "#/definitions/Engines"
},
"description": "Names of engines with support for the feature that requires setting\na runtime flag or preference."
},
"partial": {
"type": "array",
"items": {
"$ref": "#/definitions/Engines"
},
"description": "Names of engines with support for the feature that differs from the\nspec in a way that may cause compatibility problems."
},
"prefixed": {
"type": "array",
"items": {
"$ref": "#/definitions/Engines"
},
"description": "Names of engines with support for the feature that requires adding\na prefix to the standard feature name defined in the spec."
},
"support": {
"anyOf": [
{
"$ref": "#/definitions/Support"
},
{
"type": "null"
}
],
"description": "Per-browser data about support for the feature."
},
"caniuse": {
"type": "object",
"properties": {
"feature": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"feature",
"title"
],
"additionalProperties": false,
"description": "The caniuse.com shortname for the feature, along with the title of\nthe caniuse.com table (page) for the feature."
}
},
"required": [
"name",
"filename",
"title",
"slug",
"summary",
"engines",
"support"
],
"additionalProperties": false,
"description": "Each object for a feature has data from the MDN article for the feature,\nalong with data from BCD https://github.com/mdn/browser-compat-data/."
},
"Engines": {
"type": "string",
"enum": [
"blink",
"gecko",
"webkit"
]
},
"Support": {
"type": "object",
"properties": {
"chrome": {
"$ref": "#/definitions/SupportData"
},
"chrome_android": {
"$ref": "#/definitions/SupportData"
},
"edge": {
"$ref": "#/definitions/SupportData"
},
"edge_blink": {
"$ref": "#/definitions/SupportData"
},
"firefox": {
"$ref": "#/definitions/SupportData"
},
"firefox_android": {
"$ref": "#/definitions/SupportData"
},
"ie": {
"$ref": "#/definitions/SupportData"
},
"nodejs": {
"$ref": "#/definitions/SupportData"
},
"opera": {
"$ref": "#/definitions/SupportData"
},
"opera_android": {
"$ref": "#/definitions/SupportData"
},
"qq_android": {
"$ref": "#/definitions/SupportData"
},
"safari": {
"$ref": "#/definitions/SupportData"
},
"safari_ios": {
"$ref": "#/definitions/SupportData"
},
"samsunginternet_android": {
"$ref": "#/definitions/SupportData"
},
"uc_android": {
"$ref": "#/definitions/SupportData"
},
"uc_chinese_android": {
"$ref": "#/definitions/SupportData"
},
"webview_android": {
"$ref": "#/definitions/SupportData"
}
},
"additionalProperties": false
},
"SupportData": {
"anyOf": [
{
"$ref": "#/definitions/SupportDetails"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/SupportDetails"
}
}
]
},
"SupportDetails": {
"type": "object",
"properties": {
"version_added": {
"type": [
"string",
"boolean",
"null"
],
"description": "Either: (1) a browser version number (the first version of the\nbrowser to add support for the feature), or (2) boolean true to\nindicate just that the browser supports the feature (but the first\nversion to add support for it is unknown), or (3) boolean false to\nindicate the browser doesn't support the feature, or else (4) null\nto indicate it's unknown whether the browser supports the feature."
},
"version_removed": {
"type": [
"string",
"boolean",
"null"
],
"description": "Either: (1) a browser version number (the version of the browser\nwhich dropped support for the feature), or (2) boolean true to\nindicate just that the feature was dropped from the browser (but the\nfirst version to drop support for it is unknown). (Boolean false and\nnull are also allowed as values, but the semantics are undefined.)"
},
"alternative_name": {
"type": "string",
"description": "Alternative name for the feature, for cases of a feature implemented\nunder a wholly different name (in contrast to just being prefixed)."
},
"flags": {
"type": "array",
"items": {
"$ref": "#/definitions/Flag"
},
"description": "Data about flags needed to enable support for the feature."
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"description": "Additional/noteworthy information about support for the feature."
},
"partial_implementation": {
"type": "boolean",
"description": "Boolean indicating whether support for the feature deviates from the\nspecification in a way that may cause compatibility problems."
},
"prefix": {
"type": "string",
"description": "Prefix that must be added to the feature name defined in the spec in\norder to enable support. Includes any leading/trailing dashes."
}
},
"required": [
"version_added"
],
"additionalProperties": false
},
"Flag": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the flag or preference that must be set in order to\nenable support for the feature."
},
"type": {
"type": "string",
"enum": [
"preference",
"runtime_flag"
]
},
"value_to_set": {
"type": "string",
"description": "The value to which the specified flag must be set in order to enable\nsupport for the feature."
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
}
}
}