@cryptotaxi247 / netdata-1 / commits / f4805f805

collector meta schema: global config examples folding + per example (#15398)

Ilya Mashchenko committed Jul 14, 2023 at 16:24 UTC f4805f8053a49fd627a89f4ec328c37b2d75167e
3 files changed +28 -6
collectors/metadata/schemas/definitions.json
+19 -2
@@ -203,11 +203,11 @@
203 "description": "Content folding settings.",
204 "properties": {
205 "title": {
206 - "description": "Folded content summary title",
206 + "description": "Folded content summary title.",
207 "type": "string"
208 },
209 "enabled": {
210 - "description": "Determines if this content should be folded",
210 + "description": "Determines if this content should be folded.",
211 "type": "boolean"
212 }
213 },
@@ -216,6 +216,23 @@
216 "enabled"
217 ]
218 },
219 + "folding_relaxed": {
220 + "type": "object",
221 + "description": "Content folding settings with optional title.",
222 + "properties": {
223 + "title": {
224 + "description": "Folded content summary title.",
225 + "type": "string"
226 + },
227 + "enabled": {
228 + "description": "Determines if this content should be folded.",
229 + "type": "boolean"
230 + }
231 + },
232 + "required": [
233 + "enabled"
234 + ]
235 + },
236 "non-empty-string": {
237 "type": "string",
238 "minLength": 2
collectors/metadata/schemas/single-module.json
+5 -2
@@ -332,6 +332,9 @@
332 "type": "object",
333 "description": "Configuration examples. The more examples the better!",
334 "properties": {
335 + "folding": {
336 + "$ref": "./definitions.json#/definitions/folding"
337 + },
338 "list": {
339 "type": "array",
340 "description": "List of configuration examples.",
@@ -343,7 +346,7 @@
346 "description": "Example name."
347 },
348 "folding": {
346 - "$ref": "./definitions.json#/definitions/folding"
349 + "$ref": "./definitions.json#/definitions/folding_relaxed"
350 },
351 "description": {
352 "type": "string",
@@ -355,7 +358,6 @@
358 }
359 },
360 "required": [
358 - "folding",
361 "name",
362 "description",
363 "config"
@@ -364,6 +366,7 @@
366 }
367 },
368 "required": [
369 + "folding",
370 "list"
371 ]
372 }
collectors/metadata/single-module-template.yaml
+4 -2
@@ -53,11 +53,13 @@ setup:
53 description: ""
54 required: false
55 examples:
56 + folding:
57 + enabled: true
58 + title: ""
59 list:
60 - name: ""
61 folding:
59 - enabled: true
60 - title: ""
62 + enabled: false
63 description: ""
64 config: ""
65 troubleshooting: