From b6901b59e65c85761835335da2d40583bfc3f14d Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Fri, 17 Apr 2026 16:56:51 +0200 Subject: [PATCH] feat(schema): More described opts --- config.schema.json | 54 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/config.schema.json b/config.schema.json index 755ecaa..8df58d0 100644 --- a/config.schema.json +++ b/config.schema.json @@ -6,7 +6,7 @@ "type": "array", "items": { "type": "string", - "pattern": "^([a-zA-Z0-9.-_]+\/)+", + "pattern": "^([a-zA-Z0-9.-_]+\\/)+", "description": "Path to other configs, relative to this file (e.g. config/pkgs.yaml will expand to dirname(this_file)/config/pkgs.yaml)" }, "description": "Imports for other config files that will be merged into this one. Precedence order is bottom up (i.e. lowest has highest precedence)" @@ -45,11 +45,59 @@ }, "git": { "type": "object", - "properties": {} + "description": "Options", + "properties": { + "creds": { + "type": "object", + "description": "Which git services to log into", + "properties": { + "ssh_cert": { + "type": "string" + } + } + }, + "repos": { + "type": "array", + "description": "Which repos to clone (removing one from here doesn't delete it from the system and only pulls if folder does not exist)", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "git clone URL", + "pattern": "^(https?:\\/\\/([a-z0-9-]+\\.)+[a-z]+(\\/[a-zA-Z0-9-.]+)+)|(([a-z]+@[a-z0-9-]+\\.)+[a-z]+:([a-zA-Z0-9.-]+\\/)+[a-zA-Z0-9.-]+)" + }, + "clone_path": { + "type": "string", + "description": "The location on the local system where to put it. Must be absolute path. Parent folders will be created if they don't exist", + "pattern": "^~?\\/([0-9a-zA-Z.-_]+\\/)*" + } + } + } + } + } }, "template_data": { "type": "array", - "items": {} + "description": "The data to be inserted into the templates", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name that appears in the template" + }, + "data": { + "type": "string", + "description": "The data that is to be inserted" + } + }, + "required": [ + "properties", + "data" + ], + "additionalProperties": false + } }, "cmds": { "type": "array",