Skip to content

Commit

Permalink
docs: render JSON Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
kashalls authored and github-actions[bot] committed Jan 5, 2024
1 parent e0ca887 commit 79574e5
Showing 1 changed file with 65 additions and 44 deletions.
109 changes: 65 additions & 44 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -1,51 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/kashalls/kromgo/main/config.schema.json",
"additionalProperties": false,
"description": "kromgo configuration file",
"properties": {
"debug": {
"type": "boolean"
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"query": {
"type": "string"
},
"prefix": {
"type": "string"
},
"suffix": {
"type": "string"
"$ref": "#/$defs/Config",
"$defs": {
"Config": {
"properties": {
"debug": {
"type": "boolean"
},
"metrics": {
"items": {
"$ref": "#/$defs/Metric"
},
"colors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"color": {
"type": "string"
},
"min": {
"type": "integer"
},
"max": {
"type": "integer"
}
},
"required": ["color", "min", "max"]
}
}
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"metrics"
]
},
"Metric": {
"properties": {
"name": {
"type": "string"
},
"required": ["name", "query"]
}
"query": {
"type": "string"
},
"prefix": {
"type": "string"
},
"suffix": {
"type": "string"
},
"colors": {
"items": {
"$ref": "#/$defs/MetricColor"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"query"
]
},
"required": ["metrics"]
"MetricColor": {
"properties": {
"color": {
"type": "string"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"color",
"min",
"max"
]
}
}
}

0 comments on commit 79574e5

Please sign in to comment.