From e2a870f746745a0d2d315fde934b3b959c02636c Mon Sep 17 00:00:00 2001 From: psyirius Date: Wed, 7 Aug 2024 08:20:03 -0700 Subject: [PATCH] added json-schema for config/applications.json --- config/applications.json | 1 + schemas/config/applications.json | 55 ++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 schemas/config/applications.json diff --git a/config/applications.json b/config/applications.json index c7ad5a7e..8f22a4a1 100644 --- a/config/applications.json +++ b/config/applications.json @@ -1,4 +1,5 @@ { + "$schema": "../schemas/config/applications.json", "1password": { "category": "Utilities", "choco": "1password", diff --git a/schemas/config/applications.json b/schemas/config/applications.json new file mode 100644 index 00000000..3e0d459c --- /dev/null +++ b/schemas/config/applications.json @@ -0,0 +1,55 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "definitions": { + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^[a-zA-Z_][a-zA-Z0-9_]*$": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "description": { + "type": "string" + }, + "category": { + "type": "string", + "enum": [ + "Utilities", + "Document", + "Pro Tools", + "Multimedia Tools", + "Development", + "Games", + "Microsoft Tools", + "Browsers", + "Communications" + ] + }, + "choco": { + "type": "string" + }, + "winget": { + "type": "string" + }, + "link": { + "$ref": "#/definitions/url" + } + }, + "required": [ + "content", + "description", + "category", + "link", + "choco", + "winget" + ], + "additionalProperties": false + } + } +}