From a4dc3c58de3921db6b7041fbd00112e1b5a846bc Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Wed, 4 Oct 2023 11:59:14 -0500 Subject: [PATCH] chore: Split up settings schema JSON file --- schemas/settings-schema.json | 32 ++------------------------------ schemas/settings/repository.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 schemas/settings/repository.json diff --git a/schemas/settings-schema.json b/schemas/settings-schema.json index 6e146597..c4dc7c38 100644 --- a/schemas/settings-schema.json +++ b/schemas/settings-schema.json @@ -12,11 +12,11 @@ "title": "Settings for any local git clones that Recyclarr manages", "properties": { "trash_guides": { - "$ref": "#/$defs/repository", + "$ref": "settings/repository.json", "title": "Settings for the Trash Guides GitHub repository" }, "config_templates": { - "$ref": "#/$defs/repository", + "$ref": "settings/repository.json", "title": "Settings for the Recyclarr Config Templates GitHub repository" } } @@ -41,33 +41,5 @@ } } } - }, - "$defs": { - "repository": { - "type": "object", - "additionalProperties": false, - "properties": { - "clone_url": { - "type": "string", - "format": "uri", - "title": "Clone URL to the trash guides git repository", - "description": "A URL compatible with `git clone` that is used to clone the Trash Guides repository. This setting exists for enthusiasts that may want to instead have Recyclarr pull data from a fork instead of the official repository." - }, - "branch": { - "type": "string", - "title": "The name of a branch to check out in the repository" - }, - "sha1": { - "type": "string", - "title": "A SHA1 (commit hash) in Git to use", - "description": "If specified, it overrides the `branch` setting. This SHA1 is passed to `git reset --hard` to force your local clone to this specific revision in the repository. If not specified, only the `branch` controls what revision is used in the repo." - }, - "git_path": { - "type": "string", - "title": "Provide an explicit path to your git executable", - "description": "Note that this is a path to the actual executable itself and not a directory path. If this setting is not specified, Recyclarr will attempt to find git via your PATH environment variable." - } - } - } } } diff --git a/schemas/settings/repository.json b/schemas/settings/repository.json new file mode 100644 index 00000000..e698aa2b --- /dev/null +++ b/schemas/settings/repository.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://raw.githubusercontent.com/recyclarr/recyclarr/master/schemas/settings/repository.json", + "type": "object", + "additionalProperties": false, + "properties": { + "clone_url": { + "type": "string", + "format": "uri", + "title": "Clone URL to the trash guides git repository", + "description": "A URL compatible with `git clone` that is used to clone the Trash Guides repository. This setting exists for enthusiasts that may want to instead have Recyclarr pull data from a fork instead of the official repository." + }, + "branch": { + "type": "string", + "title": "The name of a branch to check out in the repository" + }, + "sha1": { + "type": "string", + "title": "A SHA1 (commit hash) in Git to use", + "description": "If specified, it overrides the `branch` setting. This SHA1 is passed to `git reset --hard` to force your local clone to this specific revision in the repository. If not specified, only the `branch` controls what revision is used in the repo." + }, + "git_path": { + "type": "string", + "title": "Provide an explicit path to your git executable", + "description": "Note that this is a path to the actual executable itself and not a directory path. If this setting is not specified, Recyclarr will attempt to find git via your PATH environment variable." + } + } +}