refactor: add JSON schema validation on configs

This commit is contained in:
Nicolas Meienberger 2022-08-24 11:18:00 +02:00
parent db234272d4
commit b87dd2d1f5
40 changed files with 162 additions and 0 deletions

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Adguard",
"available": true,
"tipi_version": 1,

View File

@ -1,8 +1,10 @@
{
"$schema": "../schema.json",
"name": "Booksonic",
"available": true,
"port": 8040,
"tipi_version": 1,
"version": "latest",
"id": "booksonic",
"categories": ["books", "media"],
"description": "",

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Calibre-Web - EBook Reader",
"available": true,
"port": 8100,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Code-Server - Web VS Code",
"available": true,
"port": 8101,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "File Browser",
"available": true,
"port": 8096,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Firefly III",
"available": true,
"port": 8115,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "FreshRSS",
"available": true,
"port": 8086,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Ghost",
"port": 8117,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Gitea",
"port": 8108,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Homarr",
"available": true,
"port": 8102,

View File

@ -1,8 +1,10 @@
{
"$schema": "../schema.json",
"name": "Home Assistant",
"available": true,
"port": 8123,
"tipi_version": 2,
"version": "stable",
"id": "homeassistant",
"categories": ["automation"],
"description": "Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.",

View File

@ -1,8 +1,10 @@
{
"$schema": "../schema.json",
"name": "Invidious",
"available": true,
"port": 8095,
"id": "invidious",
"version": "latest",
"tipi_version": 1,
"categories": ["media", "social"],
"description": "Invidious is an open source alternative front-end to YouTube.",

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Jackett",
"available": true,
"port": 8097,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Jellyfin",
"available": true,
"port": 8091,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Joplin Server",
"available": true,
"port": 8099,

View File

@ -1,9 +1,11 @@
{
"$schema": "../schema.json",
"name": "LibReddit",
"available": true,
"port": 8105,
"id": "libreddit",
"tipi_version": 1,
"version": "latest",
"categories": ["social"],
"description": "LibReddit is a bloat free reddit frontend written in Rust, no ads, no tracking and strong Content Security Policy prevents any request from going to reddit, everything is proxied.",
"short_desc": "Browse reddit without problems!",

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Mealie",
"port": 8114,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "n8n",
"available": true,
"port": 8094,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Nextcloud",
"available": true,
"port": 8083,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Nitter",
"available": true,
"port": 8106,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Node-RED",
"port": 8111,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Overseerr",
"available": true,
"port": 8116,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "PhotoPrism",
"port": 8110,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Pi-hole",
"available": true,
"port": 8081,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Plex",
"available": true,
"port": 32400,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Portainer",
"port": 9443,
"available": true,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Prowlarr",
"available": true,
"port": 8109,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "ProxiTok",
"available": true,
"port": 8118,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Radarr",
"available": true,
"port": 8088,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Readarr",
"available": true,
"port": 8112,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Resilio",
"port": 8113,
"available": true,

119
apps/schema.json Normal file
View File

@ -0,0 +1,119 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string"
},
"name": {
"type": "string"
},
"available": {
"type": "boolean"
},
"port": {
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"requirements": {
"type": "object",
"properties": {
"ports": {
"type": "array",
"items": [
{
"type": "integer"
}
]
}
}
},
"id": {
"type": "string",
"pattern": "^[a-z0-9-_]+$"
},
"tipi_version": {
"type": "integer"
},
"version": {
"type": "string"
},
"categories": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"description": {
"type": "string"
},
"short_desc": {
"type": "string"
},
"author": {
"type": "string"
},
"source": {
"type": "string",
"format": "uri"
},
"website": {
"type": "string",
"format": "uri"
},
"url_suffix": {
"type": "string",
"pattern": "^/[a-z0-9-_]+$"
},
"form_fields": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"label": {
"type": "string"
},
"max": {
"type": "integer"
},
"min": {
"type": "integer"
},
"required": {
"type": "boolean"
},
"env_variable": {
"type": "string"
}
},
"required": ["type", "label", "env_variable"]
}
]
}
},
"required": [
"name",
"available",
"port",
"id",
"tipi_version",
"version",
"categories",
"description",
"short_desc",
"author",
"source",
"form_fields"
]
}

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Sonarr",
"available": true,
"port": 8098,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Syncthing",
"available": true,
"port": 8090,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Tailscale",
"available": true,
"port": 8093,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Tautulli",
"available": true,
"port": 8181,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Transmission",
"available": true,
"port": 8089,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "VaultWarden",
"available": true,
"port": 8107,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Wireguard",
"available": true,
"port": 8082,

View File

@ -1,4 +1,5 @@
{
"$schema": "../schema.json",
"name": "Your Spotify",
"available": true,
"port": 8103,