feat(starr): add JSON schemas for cf-groups and naming files (#2628)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
owine
2026-02-20 19:37:39 -06:00
committed by GitHub
parent 2975add450
commit 086188e6c4
4 changed files with 169 additions and 0 deletions
+24
View File
@@ -20,6 +20,30 @@ repos:
types: [json]
args: ["-v", "--schemafile", "schemas/sonarr-cf.schema.json"]
- id: check-jsonschema
name: Validate Radarr CF Groups
files: ^docs/json/radarr/cf-groups/[^/]+\.json$
types: [json]
args: ["-v", "--schemafile", "schemas/cf-groups.schema.json"]
- id: check-jsonschema
name: Validate Sonarr CF Groups
files: ^docs/json/sonarr/cf-groups/[^/]+\.json$
types: [json]
args: ["-v", "--schemafile", "schemas/cf-groups.schema.json"]
- id: check-jsonschema
name: Validate Radarr Naming
files: ^docs/json/radarr/naming/[^/]+\.json$
types: [json]
args: ["-v", "--schemafile", "schemas/radarr-naming.schema.json"]
- id: check-jsonschema
name: Validate Sonarr Naming
files: ^docs/json/sonarr/naming/[^/]+\.json$
types: [json]
args: ["-v", "--schemafile", "schemas/sonarr-naming.schema.json"]
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
+67
View File
@@ -0,0 +1,67 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"trash_id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{32}$"
},
"trash_description": {
"type": "string",
"minLength": 1
},
"default": {
"type": "string",
"enum": ["true", "false"]
},
"custom_formats": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"trash_id": {
"type": "string",
"pattern": "^[a-fA-F0-9]{32}$"
},
"required": {
"type": "boolean"
},
"default": {
"type": "boolean"
}
},
"required": ["name", "trash_id", "required"],
"additionalProperties": false
}
},
"quality_profiles": {
"type": "object",
"properties": {
"include": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"pattern": "^[a-fA-F0-9]{32}$"
}
},
"additionalProperties": false,
"minProperties": 1
}
},
"required": ["include"],
"additionalProperties": false
}
},
"required": ["name", "trash_id", "custom_formats", "quality_profiles"],
"additionalProperties": false
}
+30
View File
@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"folder": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"minProperties": 1
},
"file": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"minProperties": 1
}
},
"required": ["folder", "file"],
"additionalProperties": false
}
+48
View File
@@ -0,0 +1,48 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"season": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"minProperties": 1
},
"series": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"minProperties": 1
},
"episodes": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "object",
"patternProperties": {
"^.+$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"minProperties": 1
}
},
"additionalProperties": false,
"minProperties": 1
}
},
"required": ["season", "series", "episodes"],
"additionalProperties": false
}