mirror of
https://github.com/TRaSH-Guides/Guides.git
synced 2026-05-20 00:08:38 -05:00
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:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user