Add configuration validation with jsonschema

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2020-11-26 14:48:46 +01:00
commit 17f0948aeb
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
6 changed files with 30 additions and 7 deletions

21
config.schema.json Normal file
View file

@ -0,0 +1,21 @@
{
"type": "object",
"properties": {
"chat_id": {
"type": "number"
},
"auth_key": {
"type": "string"
},
"host_template": {
"type": "string"
},
"service_template": {
"type": "string"
}
},
"required": [
"chat_id",
"auth_key"
]
}