-
Notifications
You must be signed in to change notification settings - Fork 0
/
registry.schema.json
385 lines (385 loc) · 16.6 KB
/
registry.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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
{
"$id": "https://registry.k6.io/registry.schema.json",
"$schema": "http://json-schema.org/draft-07/schema",
"$ref": "#/$defs/registry",
"$defs": {
"registry": {
"description": "k6 Extension Registry.\n\nThe k6 extension registry contains the most important properties of registered extensions.\n",
"type": "array",
"items": {
"$ref": "#/$defs/extension"
}
},
"catalog": {
"description": "k6 Extension Catalog.\n\nThe k6 extension catalog is an alternative representation of the k6 extension registry.\nThe catalog stores the extension data in an associative array (object),\nwhere the key is the import path for JavaScript extensions, and the output name for output extensions.\nThis data structure is optimized to resolve extensions as dependencies.\n",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/extension"
}
},
"extension": {
"type": "object",
"description": "Properties of the registered k6 extension.\n\nOnly those properties of the extensions are registered, which either cannot be detected automatically, or delegation to the extension is not allowed.\n\nProperties that are available using the repository manager API are intentionally not registered.\n\nThe string like properties that are included in the generated Grafana documentation are intentionally not accessed via the API of the repository manager. It is not allowed to inject arbitrary text into the Grafana documentation site without approval. Therefore, these properties are registered (eg `description`)\n",
"properties": {
"module": {
"type": "string",
"description": "The extension's go module path.\n\nThis is the unique identifier of the extension.\nMore info about module paths: https://go.dev/ref/mod#module-path\n\nThe extension has no name property, the module path or part of it can be used as the extension name. For example, using the first two elements of the module path after the host name, the name `grafana/xk6-dashboard` can be formed from the module path `github.com/grafana/xk6-dashboard`. This is typically the repository owner name and the repository name in the repository manager.\n\nThe extension has no URL property, a URL can be created from the module path that refers to the extension within the repository manager.\n",
"examples": [
"github.com/grafana/xk6-dashboard",
"github.com/szkiba/xk6-top"
]
},
"imports": {
"type": "array",
"items": {
"type": "string",
"pattern": "^k6/x/"
},
"description": "List of JavaScript import paths registered by the extension.\n\nCurrently, paths must start with the prefix `k6/x/`.\n\nThe extensions used by k6 scripts are automatically detected based on the values specified here, therefore it is important that the values used here are consistent with the values registered by the extension at runtime.\n",
"examples": [
[
"k6/x/csv",
"k6/x/csv/stream"
],
[
"k6/x/toml"
]
]
},
"outputs": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of output names registered by the extension.\n\nThe extensions used by k6 scripts are automatically detected based on the values specified here, therefore it is important that the values used here are consistent with the values registered by the extension at runtime.\n",
"examples": [
[
"dashboard"
],
[
"plugin"
]
]
},
"description": {
"type": "string",
"default": "",
"description": "Brief description of the extension.\n",
"examples": [
"This is a very cool extension, it displays the message 'Hello World!'"
]
},
"versions": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of supported versions.\n\nVersions are tags whose format meets the requirements of semantic versioning. Version tags often start with the letter `v`, which is not part of the semantic version.\n",
"examples": [
[
"v0.1.0",
"v0.2.0",
"v0.2.1"
]
]
},
"cgo": {
"type": "boolean",
"default": false,
"description": "Flag indicating the need for cgo.\n\nThe `cgo` property value `true` indicates that cgo must be enabled to build the extension.\n"
},
"constraints": {
"type": "string",
"pattern": "[vxX*|,&\\^0-9.+-><=, ~]+",
"default": "",
"description": "Version constraints.\n\nVersion constraints are primarily used to filter automatically detected versions.\nIt can also be used to filter the versions property imported from the origin registry.\n",
"examples": [
[
">=v0.4.0",
">v0.50.0"
]
]
},
"repo": {
"$ref": "#/$defs/repository",
"description": "Repository metadata.\n\nMetadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at runtime using the repository manager API.\n"
},
"tier": {
"$ref": "#/$defs/tier",
"default": "community",
"description": "Maintainer of the extension.\n\nPossible values:\n\n - official: Extensions owned, maintained, and designated by Grafana as \"official\"\n - partner: Extensions written, maintained, validated, and published by third-party companies against their own projects.\n - community: Extensions are listed on the Registry by individual maintainers, groups of maintainers, or other members of the k6 community.\n\nExtensions owned by the `grafana` GitHub organization are not officially supported by Grafana by default.\nThere are several k6 extensions owned by the `grafana` GitHub organization, which were created for experimental or example purposes only.\nThe `official` tier value is needed so that officially supported extensions can be distinguished from them.\n\nIf it is missing from the registry source, it will be set with the default \"community\" value during generation.\n",
"examples": [
"community",
"official"
]
},
"products": {
"type": "array",
"items": {
"$ref": "#/$defs/product"
},
"description": "Products in which the extension can be used.\n\nSome extensions are not available in all k6 products.\nThis may be for a technological or business reason, or the functionality of the extension may not make sense in the given product.\n\nPossible values:\n\n - oss: Extensions are available in k6 OSS\n - cloud: Extensions are available in Grafana Cloud k6\n - synthetic: Extensions are available in Grafana Synthetic Monitoring\n\nIf the property is missing or empty in the source of the registry, it means that the extension is only available in the k6 OSS product.\nIn this case, the registry will be filled in accordingly during generation.\n",
"examples": [
[
"cloud",
"synthetic",
"oss"
],
[
"cloud"
],
[
"oss"
]
]
},
"categories": {
"type": "array",
"items": {
"$ref": "#/$defs/category"
},
"description": "The categories to which the extension belongs.\n\nIf the property is missing or empty in the registry source, the default value is `[\"misc\"]`.\n",
"examples": [
[
"data",
"reporting"
],
[
"observability",
"protocol"
]
]
},
"compliance": {
"$ref": "#/$defs/compliance",
"description": "The result of the extension's k6 compliance checks.\n"
}
},
"required": [
"module"
],
"additionalProperties": false
},
"compliance": {
"description": "The result of the extension's k6 compliance checks.\n",
"type": "object",
"required": [
"grade",
"level"
],
"properties": {
"level": {
"description": "Compliance expressed as a percentage.\n\nThe `level` property contains a percentage of how well the extension complies with best practices.\nThe value of the `level` can be between `0-100` and is determined by the weighted and normalized sum of the scores of the compliance checks.\n",
"examples": [
87,
34,
100
],
"type": "integer",
"minimum": 0,
"maximum": 100
},
"grade": {
"$ref": "#/$defs/grade",
"description": "Compliance expressed as a grade.\n\nThe `grade` property contains a grade (A-F) of how well the extension complies with best practices.\nThe value of the `grade` can be `A`,`B`,`C`,`D`,`E`,`F` and is calculated from the `level` property.\n",
"examples": [
"C",
"A"
]
}
},
"additionalProperties": false
},
"grade": {
"description": "The results of the checks are in the form of a grade.\n",
"type": "string",
"enum": [
"A",
"B",
"C",
"D",
"E",
"F",
"G"
],
"examples": [
"C",
"A"
]
},
"repository": {
"type": "object",
"description": "Repository metadata.\n\nMetadata provided by the extension's git repository manager. Repository metadata are not registered, they are queried at runtime using the repository manager API.\n",
"required": [
"name",
"owner",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the repository.\n",
"examples": [
"xk6-dashboard",
"xk6-sql"
]
},
"owner": {
"type": "string",
"description": "The owner of the repository.\n",
"examples": [
"grafana"
]
},
"url": {
"type": "string",
"description": "URL of the repository.\n\nThe URL is provided by the repository manager and can be displayed in a browser.\n",
"examples": [
"https://github.com/grafana/xk6-dashboard"
]
},
"homepage": {
"type": "string",
"default": "",
"description": "The URL to the project homepage.\n\nIf no homepage is set, the value is the same as the url property.\n",
"examples": [
"https://github.com/grafana/xk6-dashboard"
]
},
"description": {
"type": "string",
"default": "",
"description": "Repository description.\n",
"examples": [
"This is a wonderful extension, it says 'Hello Wonderful World!'"
]
},
"stars": {
"type": "integer",
"default": "0",
"description": "The number of stars in the extension's repository.\n\nThe extension's popularity is indicated by how many users have starred the extension's repository.\n",
"examples": [
365,
202
]
},
"topics": {
"type": "array",
"items": {
"type": "string"
},
"description": "Repository topics.\n\nTopics make it easier to find the repository. It is recommended to set the xk6 topic to the extensions repository.\n",
"examples": [
[
"xk6",
"testing"
],
[
"xk6"
]
]
},
"public": {
"type": "boolean",
"default": "false",
"description": "Public repository flag.\n\nA `true` value indicates that the repository is public, available to anyone.\n",
"examples": [
true
]
},
"license": {
"type": "string",
"default": "",
"description": "The SPDX ID of the extension's license.\n\nFor more information about SPDX, visit https://spdx.org/licenses/\n",
"examples": [
"AGPL-3.0-only",
"MIT"
]
},
"archived": {
"type": "boolean",
"default": "false",
"description": "Archived repository flag.\n\nA `true` value indicates that the repository is archived, read only.\n\nIf a repository is archived, it usually means that the owner has no intention of maintaining it. Such extensions should be removed from the registry.\n"
},
"timestamp": {
"type": "number",
"default": 0,
"description": "Last modification timestamp.\n\nThe timestamp property contains the timestamp of the last modification of the repository in UNIX time format (the number of non-leap seconds that have elapsed since 00:00:00 UTC on 1st January 1970).\nIts value depends on the repository manager, in the case of GitHub it contains the time of the last push operation, in the case of GitLab the time of the last repository activity.\n",
"examples": [
1725277028,
1690893368
]
},
"clone_url": {
"type": "string",
"default": "",
"description": "URL for the git clone operation.\n\nThe clone_url property contains a (typically HTTP) URL, which is used to clone the repository.\n",
"examples": [
"https://github.com/grafana/xk6-dashboard.git",
"https://github.com/grafana/xk6-sql.git"
]
}
}
},
"tier": {
"type": "string",
"enum": [
"official",
"partner",
"community"
],
"description": "Maintainer of the extension.\n\nExtensions can be classified according to who maintains the extension.\nThis usually also specifies who the user can get support from.\n\nPossible values:\n\n - official: Extensions owned, maintained, and designated by Grafana as \"official\"\n - partner: Extensions written, maintained, validated, and published by third-party companies against their own projects.\n - community: Extensions are listed on the Registry by individual maintainers, groups of maintainers, or other members of the k6 community.\n\nExtensions owned by the `grafana` GitHub organization are not officially supported by Grafana by default.\nThere are several k6 extensions owned by the `grafana` GitHub organization, which were created for experimental or example purposes only.\nThe `official` tier value is needed so that officially supported extensions can be distinguished from them.\n\nIf it is missing from the registry source, it will be set with the default `community` value during generation.\n",
"examples": [
"community",
"official"
]
},
"product": {
"type": "string",
"enum": [
"oss",
"cloud",
"synthetic"
],
"description": "Products in which the extension can be used.\n\nSome extensions are not available in all k6 products.\nThis may be for a technological or business reason, or the functionality of the extension may not make sense in the given product.\n\nPossible values:\n\n - oss: Extensions are available in k6 OSS\n - cloud: Extensions are available in Grafana Cloud k6\n - synthetic: Extensions are available in Grafana Synthetic Monitoring\n\nIf it is missing from the registry source, it will be set with the default `[\"community\"]` value during generation.\n",
"examples": [
[
"cloud",
"synthetic",
"oss"
],
[
"cloud"
],
[
"oss"
]
]
},
"category": {
"type": "string",
"enum": [
"authentication",
"browser",
"data",
"kubernetes",
"messaging",
"misc",
"observability",
"protocol",
"reporting"
],
"description": "The categories to which the extension belongs.\n\nIf it is missing from the registry source, it will be set with the default `[\"misc\"]` value during generation.\n",
"examples": [
[
"data",
"reporting"
],
[
"observability",
"protocol"
]
]
}
}
}