@webda/core 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application.d.ts +12 -0
- package/lib/application.js.map +1 -1
- package/lib/core.d.ts +26 -3
- package/lib/core.js +53 -2
- package/lib/core.js.map +1 -1
- package/lib/core.spec.js +1 -1
- package/lib/core.spec.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/models/coremodel.d.ts +24 -1
- package/lib/models/coremodel.js +66 -1
- package/lib/models/coremodel.js.map +1 -1
- package/lib/models/coremodel.spec.js +58 -1
- package/lib/models/coremodel.spec.js.map +1 -1
- package/lib/queues/memoryqueue.spec.js +4 -0
- package/lib/queues/memoryqueue.spec.js.map +1 -1
- package/lib/queues/queueservice.d.ts +8 -0
- package/lib/queues/queueservice.js +28 -0
- package/lib/queues/queueservice.js.map +1 -1
- package/lib/services/authentication.d.ts +14 -2
- package/lib/services/authentication.js +105 -70
- package/lib/services/authentication.js.map +1 -1
- package/lib/services/binary.d.ts +11 -1
- package/lib/services/binary.js +28 -1
- package/lib/services/binary.js.map +1 -1
- package/lib/services/fileconfiguration.js +9 -3
- package/lib/services/fileconfiguration.js.map +1 -1
- package/lib/services/fileconfiguration.spec.js +43 -0
- package/lib/services/fileconfiguration.spec.js.map +1 -1
- package/lib/services/mailer.d.ts +9 -1
- package/lib/services/mailer.js +30 -7
- package/lib/services/mailer.js.map +1 -1
- package/lib/services/mailer.spec.js +5 -0
- package/lib/services/mailer.spec.js.map +1 -1
- package/lib/services/oauth.d.ts +8 -1
- package/lib/services/oauth.js +11 -0
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/prometheus.d.ts +97 -0
- package/lib/services/prometheus.js +151 -0
- package/lib/services/prometheus.js.map +1 -0
- package/lib/services/prometheus.spec.d.ts +1 -0
- package/lib/services/prometheus.spec.js +57 -0
- package/lib/services/prometheus.spec.js.map +1 -0
- package/lib/services/proxy.d.ts +11 -0
- package/lib/services/proxy.js +47 -2
- package/lib/services/proxy.js.map +1 -1
- package/lib/services/resource.js +2 -1
- package/lib/services/resource.js.map +1 -1
- package/lib/services/resource.spec.js +5 -5
- package/lib/services/service.d.ts +16 -1
- package/lib/services/service.js +18 -0
- package/lib/services/service.js.map +1 -1
- package/lib/stores/aliasstore.d.ts +1 -0
- package/lib/stores/aliasstore.js +1 -0
- package/lib/stores/aliasstore.js.map +1 -1
- package/lib/stores/file.js +1 -0
- package/lib/stores/file.js.map +1 -1
- package/lib/stores/file.spec.js +9 -0
- package/lib/stores/file.spec.js.map +1 -1
- package/lib/stores/memory.spec.js +2 -2
- package/lib/stores/memory.spec.js.map +1 -1
- package/lib/stores/store.d.ts +8 -13
- package/lib/stores/store.js +53 -41
- package/lib/stores/store.js.map +1 -1
- package/lib/stores/store.spec.js +8 -0
- package/lib/stores/store.spec.js.map +1 -1
- package/lib/test.js +8 -0
- package/lib/test.js.map +1 -1
- package/lib/utils/context.d.ts +6 -1
- package/lib/utils/context.js +10 -3
- package/lib/utils/context.js.map +1 -1
- package/lib/utils/serializers.js +1 -1
- package/lib/utils/serializers.js.map +1 -1
- package/lib/utils/serializers.spec.js +9 -1
- package/lib/utils/serializers.spec.js.map +1 -1
- package/package.json +4 -3
- package/test/config-file-missing-file-no-default.json +44 -0
- package/test/config-file-missing-file.json +57 -0
- package/test/config-invitation.json +3 -1
- package/test/config.json +3 -0
- package/webda.module.json +202 -0
|
@@ -16,7 +16,7 @@ let UtilsTest = class UtilsTest {
|
|
|
16
16
|
assert.deepStrictEqual(JSONUtils.loadFile(TEST_FOLDER + "test.json"), { test: "ok" });
|
|
17
17
|
assert.deepStrictEqual(YAMLUtils.loadFile(TEST_FOLDER + "test.json"), { test: "ok" });
|
|
18
18
|
assert.deepStrictEqual(FileUtils.load(TEST_FOLDER + "test.json"), { test: "ok" });
|
|
19
|
-
assert.throws(() => JSONUtils.loadFile("/none"), /File does not exist/);
|
|
19
|
+
assert.throws(() => JSONUtils.loadFile("/none"), /File '\/none' does not exist/);
|
|
20
20
|
assert.throws(() => JSONUtils.loadFile("./Dockerfile"), /Unknown format/);
|
|
21
21
|
}
|
|
22
22
|
fileYml() {
|
|
@@ -86,6 +86,11 @@ let UtilsTest = class UtilsTest {
|
|
|
86
86
|
throw new Error("BOUZOUF");
|
|
87
87
|
}), /BOUZOUF/);
|
|
88
88
|
}
|
|
89
|
+
octal() {
|
|
90
|
+
assert.deepEqual(YAMLUtils.parse(`
|
|
91
|
+
plop: 0o600
|
|
92
|
+
`), { plop: 384 });
|
|
93
|
+
}
|
|
89
94
|
yaml() {
|
|
90
95
|
assert.strictEqual(YAMLUtils.stringify({ plop: "test" }), `plop: test
|
|
91
96
|
`);
|
|
@@ -118,6 +123,9 @@ __decorate([
|
|
|
118
123
|
__decorate([
|
|
119
124
|
test
|
|
120
125
|
], UtilsTest.prototype, "audience", null);
|
|
126
|
+
__decorate([
|
|
127
|
+
test("YAML octal")
|
|
128
|
+
], UtilsTest.prototype, "octal", null);
|
|
121
129
|
__decorate([
|
|
122
130
|
test("YAML stringify")
|
|
123
131
|
], UtilsTest.prototype, "yaml", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializers.spec.js","sourceRoot":"","sources":["../../src/utils/serializers.spec.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhE,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MA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,CAAC,6BAA6B,CAAC;yCAGnC;AAGD;IADC,IAAI,CAAC,cAAc,CAAC;6CA0BpB;AAGD;IADC,IAAI,CAAC,eAAe,CAAC;+CAcrB;AAGD;IADC,IAAI,CAAC,iBAAiB,CAAC;0CAmBvB;AAGD;IADC,IAAI;0CAQJ;AAGD;IADC,IAAI;yCAaJ;AAGD;IADC,IAAI,CAAC,YAAY,CAAC;sCAUlB;AAGD;IADC,IAAI,CAAC,gBAAgB,CAAC;qCAetB;AA5IG,SAAS;IADd,KAAK;GACA,SAAS,CA6Id"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webda/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Expose API with Lambda",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@types/json-schema": "^7.0.8",
|
|
26
|
-
"@webda/workout": "^2.
|
|
26
|
+
"@webda/workout": "^2.3.0",
|
|
27
27
|
"accept-language": "^3.0.18",
|
|
28
28
|
"ajv": "^8.6.2",
|
|
29
29
|
"ajv-formats": "^2.1.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"nodemailer": "^6.6.3",
|
|
48
48
|
"openapi-types": "^12.0.0",
|
|
49
49
|
"pem-jwk": "^2.0.0",
|
|
50
|
+
"prom-client": "^14.1.1",
|
|
50
51
|
"sanitize-html": "^2.4.0",
|
|
51
52
|
"semver": "^7.3.5",
|
|
52
53
|
"stream-buffers": "^3.0.2",
|
|
@@ -103,5 +104,5 @@
|
|
|
103
104
|
"engines": {
|
|
104
105
|
"node": ">=14.6.0"
|
|
105
106
|
},
|
|
106
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "d6a11c7e8023530c52132e4e91cd59e131568ad8"
|
|
107
108
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"parameters": {
|
|
4
|
+
"TEST": "Global",
|
|
5
|
+
"region": "us-east-1",
|
|
6
|
+
"website": ["test.webda.io", "test2.webda.io"],
|
|
7
|
+
"locales": ["es-ES", "en-GB", "fr-FR"],
|
|
8
|
+
"configurationService": "FileConfigurationService"
|
|
9
|
+
},
|
|
10
|
+
"services": {
|
|
11
|
+
"Authentication": {
|
|
12
|
+
"successRedirect": "https://webda.io/user.html",
|
|
13
|
+
"failureRedirect": "/login-error",
|
|
14
|
+
"providers": {
|
|
15
|
+
"facebook": {},
|
|
16
|
+
"email": {
|
|
17
|
+
"from": "",
|
|
18
|
+
"subject": "",
|
|
19
|
+
"html": "",
|
|
20
|
+
"text": "Test",
|
|
21
|
+
"mailer": "DefinedMailer",
|
|
22
|
+
"postValidation": false
|
|
23
|
+
},
|
|
24
|
+
"phone": {},
|
|
25
|
+
"twitter": {},
|
|
26
|
+
"google": {},
|
|
27
|
+
"github": {}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"DefinedMailer": {
|
|
31
|
+
"type": "WebdaTest/Mailer"
|
|
32
|
+
},
|
|
33
|
+
"Users": {
|
|
34
|
+
"type": "MemoryStore"
|
|
35
|
+
},
|
|
36
|
+
"Idents": {
|
|
37
|
+
"type": "MemoryStore"
|
|
38
|
+
},
|
|
39
|
+
"FileConfigurationService": {
|
|
40
|
+
"type": "Webda/FileConfiguration",
|
|
41
|
+
"source": "./my-missing-file.json"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"parameters": {
|
|
4
|
+
"TEST": "Global",
|
|
5
|
+
"region": "us-east-1",
|
|
6
|
+
"website": ["test.webda.io", "test2.webda.io"],
|
|
7
|
+
"locales": ["es-ES", "en-GB", "fr-FR"],
|
|
8
|
+
"configurationService": "FileConfigurationService"
|
|
9
|
+
},
|
|
10
|
+
"services": {
|
|
11
|
+
"Authentication": {
|
|
12
|
+
"successRedirect": "https://webda.io/user.html",
|
|
13
|
+
"failureRedirect": "/login-error",
|
|
14
|
+
"providers": {
|
|
15
|
+
"facebook": {},
|
|
16
|
+
"email": {
|
|
17
|
+
"from": "",
|
|
18
|
+
"subject": "",
|
|
19
|
+
"html": "",
|
|
20
|
+
"text": "Test",
|
|
21
|
+
"mailer": "DefinedMailer",
|
|
22
|
+
"postValidation": false
|
|
23
|
+
},
|
|
24
|
+
"phone": {},
|
|
25
|
+
"twitter": {},
|
|
26
|
+
"google": {},
|
|
27
|
+
"github": {}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"DefinedMailer": {
|
|
31
|
+
"type": "WebdaTest/Mailer"
|
|
32
|
+
},
|
|
33
|
+
"Users": {
|
|
34
|
+
"type": "MemoryStore"
|
|
35
|
+
},
|
|
36
|
+
"Idents": {
|
|
37
|
+
"type": "MemoryStore"
|
|
38
|
+
},
|
|
39
|
+
"FileConfigurationService": {
|
|
40
|
+
"type": "Webda/FileConfiguration",
|
|
41
|
+
"source": "./my-missing-file.json",
|
|
42
|
+
"default": {
|
|
43
|
+
"webda": {
|
|
44
|
+
"services": {
|
|
45
|
+
"Authentication": {
|
|
46
|
+
"providers": {
|
|
47
|
+
"email": {
|
|
48
|
+
"text": "MissingTextAutoGenerated"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/test/config.json
CHANGED
package/webda.module.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"moddas": {
|
|
3
3
|
"webda/aggregator": "lib/stores/aggregator:default",
|
|
4
|
+
"webda/aliasstore": "lib/stores/aliasstore:AliasStore",
|
|
4
5
|
"webda/asyncevents": "lib/services/asyncevents:EventService",
|
|
5
6
|
"webda/authentication": "lib/services/authentication:Authentication",
|
|
6
7
|
"webda/configurationservice": "lib/services/configuration:default",
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"webda/memoryqueue": "lib/queues/memoryqueue:MemoryQueue",
|
|
24
25
|
"webda/memorystore": "lib/stores/memory:MemoryStore",
|
|
25
26
|
"webda/multinotificationservice": "lib/services/notificationservice:default",
|
|
27
|
+
"webda/prometheusservice": "lib/services/prometheus:PrometheusService",
|
|
26
28
|
"webda/proxyservice": "lib/services/proxy:ProxyService",
|
|
27
29
|
"webda/resourceservice": "lib/services/resource:default",
|
|
28
30
|
"webda/versionservice": "lib/services/version:VersionService"
|
|
@@ -1473,6 +1475,148 @@
|
|
|
1473
1475
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
1474
1476
|
"title": "VersionService"
|
|
1475
1477
|
},
|
|
1478
|
+
"webda/aliasstore": {
|
|
1479
|
+
"type": "object",
|
|
1480
|
+
"properties": {
|
|
1481
|
+
"type": {
|
|
1482
|
+
"type": "string",
|
|
1483
|
+
"description": "Type of the service"
|
|
1484
|
+
},
|
|
1485
|
+
"url": {
|
|
1486
|
+
"type": "string",
|
|
1487
|
+
"description": "URL on which to serve the content"
|
|
1488
|
+
},
|
|
1489
|
+
"model": {
|
|
1490
|
+
"type": "string",
|
|
1491
|
+
"description": "Webda model to use within the Store",
|
|
1492
|
+
"default": "Webda/CoreModel"
|
|
1493
|
+
},
|
|
1494
|
+
"models": {
|
|
1495
|
+
"type": "array",
|
|
1496
|
+
"items": {
|
|
1497
|
+
"type": "string"
|
|
1498
|
+
},
|
|
1499
|
+
"description": "Different models managed by this store"
|
|
1500
|
+
},
|
|
1501
|
+
"asyncDelete": {
|
|
1502
|
+
"type": "boolean",
|
|
1503
|
+
"description": "async delete"
|
|
1504
|
+
},
|
|
1505
|
+
"expose": {
|
|
1506
|
+
"$ref": "#/definitions/ExposeParameters",
|
|
1507
|
+
"description": "Expose the service to an urls"
|
|
1508
|
+
},
|
|
1509
|
+
"strict": {
|
|
1510
|
+
"type": "boolean",
|
|
1511
|
+
"description": "Allow to load object that does not have the type data\n\nIf set to true, then the Store will only managed the defined _model and no model extending this one",
|
|
1512
|
+
"default": false
|
|
1513
|
+
},
|
|
1514
|
+
"defaultModel": {
|
|
1515
|
+
"type": "boolean",
|
|
1516
|
+
"description": "When __type model not found, use the model If strict is setup this parameter is not used",
|
|
1517
|
+
"default": true
|
|
1518
|
+
},
|
|
1519
|
+
"forceModel": {
|
|
1520
|
+
"type": "boolean",
|
|
1521
|
+
"description": "If set, Store will ignore the __type",
|
|
1522
|
+
"default": false
|
|
1523
|
+
},
|
|
1524
|
+
"slowQueryThreshold": {
|
|
1525
|
+
"type": "number",
|
|
1526
|
+
"description": "Slow query threshold",
|
|
1527
|
+
"default": 30000
|
|
1528
|
+
},
|
|
1529
|
+
"parent": {
|
|
1530
|
+
"type": "object",
|
|
1531
|
+
"properties": {
|
|
1532
|
+
"name": {
|
|
1533
|
+
"type": "string"
|
|
1534
|
+
},
|
|
1535
|
+
"condition": {
|
|
1536
|
+
"type": "string"
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
"required": [
|
|
1540
|
+
"name",
|
|
1541
|
+
"condition"
|
|
1542
|
+
],
|
|
1543
|
+
"description": "Parent of the store\n\nIf parent is specified the url route is relative to it"
|
|
1544
|
+
},
|
|
1545
|
+
"graphql": {
|
|
1546
|
+
"type": "boolean",
|
|
1547
|
+
"description": "For future use in our GraphQL api\n\nExpose this store in the graphql"
|
|
1548
|
+
},
|
|
1549
|
+
"targetStore": {
|
|
1550
|
+
"type": "string",
|
|
1551
|
+
"description": "Store to alias"
|
|
1552
|
+
},
|
|
1553
|
+
"idTemplate": {
|
|
1554
|
+
"type": "string",
|
|
1555
|
+
"description": "Store to alias"
|
|
1556
|
+
},
|
|
1557
|
+
"openapi": {
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"additionalProperties": true
|
|
1560
|
+
}
|
|
1561
|
+
},
|
|
1562
|
+
"required": [
|
|
1563
|
+
"asyncDelete",
|
|
1564
|
+
"idTemplate",
|
|
1565
|
+
"slowQueryThreshold",
|
|
1566
|
+
"targetStore",
|
|
1567
|
+
"type"
|
|
1568
|
+
],
|
|
1569
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
1570
|
+
"definitions": {
|
|
1571
|
+
"ExposeParameters": {
|
|
1572
|
+
"type": "object",
|
|
1573
|
+
"properties": {
|
|
1574
|
+
"url": {
|
|
1575
|
+
"type": "string",
|
|
1576
|
+
"description": "URL endpoint to use to expose REST Resources API",
|
|
1577
|
+
"default": "service.getName().toLowerCase()"
|
|
1578
|
+
},
|
|
1579
|
+
"restrict": {
|
|
1580
|
+
"type": "object",
|
|
1581
|
+
"properties": {
|
|
1582
|
+
"create": {
|
|
1583
|
+
"type": "boolean",
|
|
1584
|
+
"description": "Do not expose the POST"
|
|
1585
|
+
},
|
|
1586
|
+
"update": {
|
|
1587
|
+
"type": "boolean",
|
|
1588
|
+
"description": "Do not expose the PUT and PATCH"
|
|
1589
|
+
},
|
|
1590
|
+
"get": {
|
|
1591
|
+
"type": "boolean",
|
|
1592
|
+
"description": "Do not expose the GET"
|
|
1593
|
+
},
|
|
1594
|
+
"delete": {
|
|
1595
|
+
"type": "boolean",
|
|
1596
|
+
"description": "Do not expose the DELETE"
|
|
1597
|
+
},
|
|
1598
|
+
"query": {
|
|
1599
|
+
"type": "boolean",
|
|
1600
|
+
"description": "Do not expose the query endpoint"
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
"description": "You can restrict any part of the CRUD",
|
|
1604
|
+
"default": {}
|
|
1605
|
+
},
|
|
1606
|
+
"queryMethod": {
|
|
1607
|
+
"type": "string",
|
|
1608
|
+
"enum": [
|
|
1609
|
+
"PUT",
|
|
1610
|
+
"GET"
|
|
1611
|
+
],
|
|
1612
|
+
"description": "For confidentiality sometimes you might prefer to expose query through PUT To avoid GET logging",
|
|
1613
|
+
"default": "GET"
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
"title": "AliasStore"
|
|
1619
|
+
},
|
|
1476
1620
|
"webda/mapper": {
|
|
1477
1621
|
"type": "object",
|
|
1478
1622
|
"properties": {
|
|
@@ -2044,6 +2188,64 @@
|
|
|
2044
2188
|
}
|
|
2045
2189
|
},
|
|
2046
2190
|
"title": "FileLogger"
|
|
2191
|
+
},
|
|
2192
|
+
"webda/prometheusservice": {
|
|
2193
|
+
"type": "object",
|
|
2194
|
+
"properties": {
|
|
2195
|
+
"type": {
|
|
2196
|
+
"type": "string",
|
|
2197
|
+
"description": "Type of the service"
|
|
2198
|
+
},
|
|
2199
|
+
"url": {
|
|
2200
|
+
"type": "string",
|
|
2201
|
+
"description": "URL on which to serve the content",
|
|
2202
|
+
"default": "/metrics"
|
|
2203
|
+
},
|
|
2204
|
+
"portNumber": {
|
|
2205
|
+
"type": "number",
|
|
2206
|
+
"description": "If defined will launch another http server to serve the scaper"
|
|
2207
|
+
},
|
|
2208
|
+
"bind": {
|
|
2209
|
+
"type": "string",
|
|
2210
|
+
"description": "If defined along with portNumber used to bind specific address for dedicated http server"
|
|
2211
|
+
},
|
|
2212
|
+
"includeNodeMetrics": {
|
|
2213
|
+
"type": "boolean",
|
|
2214
|
+
"description": "Include NodeJS engine metrics",
|
|
2215
|
+
"default": true
|
|
2216
|
+
},
|
|
2217
|
+
"includeRequestMetrics": {
|
|
2218
|
+
"type": "boolean",
|
|
2219
|
+
"description": "Include request served by Webda\n\nIt should generate common http_* metrics",
|
|
2220
|
+
"default": true
|
|
2221
|
+
},
|
|
2222
|
+
"partitionHistogram": {
|
|
2223
|
+
"type": "boolean",
|
|
2224
|
+
"description": "Do not partition histogram with requests labels"
|
|
2225
|
+
},
|
|
2226
|
+
"labels": {
|
|
2227
|
+
"type": "object",
|
|
2228
|
+
"additionalProperties": {
|
|
2229
|
+
"type": "string"
|
|
2230
|
+
},
|
|
2231
|
+
"description": "Labels to add"
|
|
2232
|
+
},
|
|
2233
|
+
"prefix": {
|
|
2234
|
+
"type": "string",
|
|
2235
|
+
"description": "Prefix to add to metrics"
|
|
2236
|
+
},
|
|
2237
|
+
"openapi": {
|
|
2238
|
+
"type": "object",
|
|
2239
|
+
"additionalProperties": true
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
"required": [
|
|
2243
|
+
"includeNodeMetrics",
|
|
2244
|
+
"includeRequestMetrics",
|
|
2245
|
+
"type"
|
|
2246
|
+
],
|
|
2247
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
2248
|
+
"title": "PrometheusService"
|
|
2047
2249
|
}
|
|
2048
2250
|
}
|
|
2049
2251
|
}
|