Skip to content

Commit

Permalink
Feature/json schema (#26)
Browse files Browse the repository at this point in the history
* feat: json schema

* feat: add doc links
  • Loading branch information
EmilyGraceSeville7cf authored May 24, 2024
1 parent 894dbc7 commit 12bb735
Showing 1 changed file with 150 additions and 0 deletions.
150 changes: 150 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "chtop settings",
"description": "chtop settings\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "object",
"properties": {
"theme": {
"title": "theme",
"description": "Theme settings\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "object",
"properties": {
"border": {
"title": "border",
"description": "A border\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"default": "violet"
},
"graph": {
"title": "graphics",
"description": "Graphics settings\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "object",
"properties": {
"color": {
"title": "color",
"description": "A color\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"default": "red"
},
"height": {
"title": "height",
"description": "A height\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "integer",
"exclusiveMinimum": 0,
"default": 5
},
"precision": {
"title": "precision",
"description": "A precision\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#themes",
"type": "integer",
"exclusiveMinimum": 0,
"default": 1
}
},
"minProperties": 1,
"additionalProperties": false
}
},
"minProperties": 1,
"additionalProperties": false
},
"clickhousemetrics": {
"title": "clickhouse metrics",
"description": "clickhousemetrics metrics\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "object",
"properties": {
"metrics": {
"title": "metrics",
"description": "A metric\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "array",
"items": {
"type": "object",
"required": [
"alias",
"name"
],
"properties": {
"alias": {
"title": "alias",
"description": "An alias\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"examples": [
"Total Queries"
]
},
"name": {
"title": "name",
"description": "A name\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"examples": [
"ClickHouseProfileEvents_Query"
]
}
},
"additionalProperties": false
},
"uniqueItems": false,
"minItems": 1
}
},
"minProperties": 1,
"additionalProperties": false
},
"clickhousequeries": {
"title": "clickhouse queries",
"description": "clickhousemetrics queries\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "object",
"properties": {
"metrics": {
"title": "metrics",
"description": "A metric\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"sql"
],
"properties": {
"name": {
"title": "name",
"description": "A name\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"examples": [
"Number of Running Queries"
]
},
"sql": {
"title": "sql",
"description": "An SQL\nhttps://github.com/chhetripradeep/chtop?tab=readme-ov-file#metrics",
"type": "string",
"minLength": 1,
"pattern": "[^ ]",
"examples": [
"select count(*) from system.processes"
]
}
},
"additionalProperties": false
},
"uniqueItems": false,
"minItems": 1
}
},
"minProperties": 1,
"additionalProperties": false
}
},
"minProperties": 1,
"additionalProperties": false
}

0 comments on commit 12bb735

Please sign in to comment.