-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistry.schema.json
594 lines (594 loc) · 24.2 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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
{
"$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"
]
},
"issues": {
"type": "array",
"description": "A list of compliance check IDs that failed.\n\nThe `issues`` property is primarily used for debugging. It contains the (implementation-dependent) identifiers of those compliance checks that failed.\n",
"items": {
"type": "string"
},
"examples": [
[
"build",
"smoke"
],
[
"readme",
"versions"
]
]
}
},
"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"
]
]
},
"metrics": {
"type": "object",
"description": "Extension registry metrics.",
"properties": {
"extension_count": {
"type": "integer",
"default": 0,
"description": "The total number of extensions."
},
"tier_official_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'official' tier."
},
"tier_unofficial_count": {
"type": "integer",
"default": 0,
"description": "Number of unofficial extensions."
},
"tier_partner_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'partner' tier."
},
"tier_community_count": {
"type": "integer",
"default": 0,
"description": "Number of extension in the community' tier."
},
"type_javascript_count": {
"type": "integer",
"default": 0,
"description": "Number of JavaScript extension."
},
"type_output_count": {
"type": "integer",
"default": 0,
"description": "Number of Output extension."
},
"product_cloud_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions available in Grafana Cloud k6."
},
"product_oss_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions available in Grafana k6."
},
"product_synthetic_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions available in Synthetic Monitoring."
},
"grade_a_count": {
"type": "integer",
"default": 0,
"description": "Number of A-grade extensions."
},
"grade_b_count": {
"type": "integer",
"default": 0,
"description": "Number of B-grade extensions."
},
"grade_c_count": {
"type": "integer",
"default": 0,
"description": "Number of C-grade extensions."
},
"grade_d_count": {
"type": "integer",
"default": 0,
"description": "Number of D-grade extensions."
},
"grade_e_count": {
"type": "integer",
"default": 0,
"description": "Number of E-grade extensions."
},
"grade_f_count": {
"type": "integer",
"default": 0,
"description": "Number of F-grade extensions."
},
"cgo_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions requiring cgo."
},
"category_authentication_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'authentication' category."
},
"category_browser_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'browser' category."
},
"category_data_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'data' category."
},
"category_kubernetes_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'kubernetes' category."
},
"category_messaging_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'messaging' category."
},
"category_misc_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'misc' category."
},
"category_observability_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'observability' category."
},
"category_protocol_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'protocol' category."
},
"category_reporting_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions in the 'reporting' category."
},
"issue_module_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without valid go.mod."
},
"issue_replace_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions with replace directive in go.mod."
},
"issue_readme_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without readme file."
},
"issue_examples_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without examples directory."
},
"issue_license_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without suitable OSS license."
},
"issue_git_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without git workdir."
},
"issue_versions_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without semantic versioning git tags."
},
"issue_build_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions not buildable with the latest k6 version."
},
"issue_smoke_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without smoke test script."
},
"issue_types_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without API declaration file."
},
"issue_codeowners_count": {
"type": "integer",
"default": 0,
"description": "Number of extensions without CODEOWNERS file."
}
},
"example": "{\n \"category_authentication_count\": 2,\n \"category_browser_count\": 1,\n \"category_data_count\": 23,\n \"category_kubernetes_count\": 2,\n \"category_messaging_count\": 11,\n \"category_misc_count\": 16,\n \"category_observability_count\": 12,\n \"category_protocol_count\": 10,\n \"category_reporting_count\": 13,\n \"cgo_count\": 1,\n \"extension_count\": 72,\n \"grade_a_count\": 19,\n \"grade_b_count\": 4,\n \"grade_c_count\": 44,\n \"grade_d_count\": 4,\n \"grade_e_count\": 1,\n \"issue_build_count\": 5,\n \"issue_codeowners_count\": 5,\n \"issue_examples_count\": 16,\n \"issue_replace_count\": 2,\n \"issue_smoke_count\": 51,\n \"issue_types_count\": 44,\n \"product_cloud_count\": 4,\n \"product_oss_count\": 71,\n \"product_synthetic_count\": 2,\n \"tier_community_count\": 54,\n \"tier_official_count\": 18,\n \"tier_unofficial_count\": 6,\n \"type_javascript_count\": 57,\n \"type_output_count\": 16\n}\n"
}
}
}