| 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "$id": "https://netdata.cloud/schemas/map.schema.json", |
| 4 | "title": "Netdata Documentation Map", |
| 5 | "description": "Schema for validating Netdata documentation map.yaml structure", |
| 6 | "type": "object", |
| 7 | "required": [ |
| 8 | "sidebar" |
| 9 | ], |
| 10 | "properties": { |
| 11 | "sidebar": { |
| 12 | "type": "array", |
| 13 | "description": "Top-level sidebar navigation structure", |
| 14 | "items": { |
| 15 | "$ref": "#/definitions/node" |
| 16 | } |
| 17 | } |
| 18 | }, |
| 19 | "definitions": { |
| 20 | "node": { |
| 21 | "oneOf": [ |
| 22 | { |
| 23 | "$ref": "#/definitions/sidebarNode" |
| 24 | }, |
| 25 | { |
| 26 | "$ref": "#/definitions/integrationPlaceholder" |
| 27 | } |
| 28 | ] |
| 29 | }, |
| 30 | "sidebarNode": { |
| 31 | "type": "object", |
| 32 | "description": "A sidebar node representing a document or category", |
| 33 | "required": [ |
| 34 | "meta" |
| 35 | ], |
| 36 | "additionalProperties": false, |
| 37 | "properties": { |
| 38 | "meta": { |
| 39 | "$ref": "#/definitions/nodeMeta" |
| 40 | }, |
| 41 | "items": { |
| 42 | "type": "array", |
| 43 | "description": "Child nodes (documents, categories, or integration placeholders)", |
| 44 | "items": { |
| 45 | "$ref": "#/definitions/node" |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | }, |
| 50 | "nodeMeta": { |
| 51 | "type": "object", |
| 52 | "description": "Metadata for a sidebar node", |
| 53 | "required": [ |
| 54 | "label" |
| 55 | ], |
| 56 | "additionalProperties": false, |
| 57 | "properties": { |
| 58 | "label": { |
| 59 | "type": "string", |
| 60 | "minLength": 1, |
| 61 | "description": "Display label for the sidebar item" |
| 62 | }, |
| 63 | "path": { |
| 64 | "type": "string", |
| 65 | "minLength": 1, |
| 66 | "description": "Path segment for this node (only if the page should not be a category overview page in this section). Single segment like 'Installation', not full path." |
| 67 | }, |
| 68 | "edit_url": { |
| 69 | "type": "string", |
| 70 | "pattern": "^https://github\\.com/[a-zA-Z0-9_-]+/[a-zA-Z0-9_.-]+/edit/[a-zA-Z0-9_.-]+/.+\\.(md|mdx)$", |
| 71 | "description": "GitHub edit URL pointing to the source markdown file" |
| 72 | }, |
| 73 | "description": { |
| 74 | "type": "string", |
| 75 | "description": "Optional description/summary of the document" |
| 76 | }, |
| 77 | "keywords": { |
| 78 | "type": "array", |
| 79 | "description": "Optional SEO keywords", |
| 80 | "items": { |
| 81 | "type": "string" |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | }, |
| 86 | "integrationPlaceholder": { |
| 87 | "type": "object", |
| 88 | "description": "Placeholder for dynamically generated integration pages", |
| 89 | "required": [ |
| 90 | "type", |
| 91 | "integration_kind" |
| 92 | ], |
| 93 | "additionalProperties": false, |
| 94 | "properties": { |
| 95 | "type": { |
| 96 | "type": "string", |
| 97 | "const": "integration_placeholder", |
| 98 | "description": "Identifies this as an integration placeholder" |
| 99 | }, |
| 100 | "integration_kind": { |
| 101 | "type": "string", |
| 102 | "enum": [ |
| 103 | "collectors", |
| 104 | "exporters", |
| 105 | "secretstore", |
| 106 | "notifications", |
| 107 | "authentication", |
| 108 | "logs", |
| 109 | "flows", |
| 110 | "agent_notifications", |
| 111 | "cloud_notifications" |
| 112 | ], |
| 113 | "description": "Type of integrations to be inserted at this location" |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | } |
| 118 | } |