Merge pull request #712 from rcdailey/metadata-validation

Validation workflow for metadata.json
pull/714/head^2
TRaSH 2 years ago committed by GitHub
commit f3b99d7bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,25 @@
name: Validate Metadata JSON
on:
push:
paths:
- metadata.json
- metadata.schema.json
- .github/workflows/metadata-validation.yml
pull_request:
paths:
- metadata.json
- metadata.schema.json
- .github/workflows/metadata-validation.yml
jobs:
validate:
runs-on: ubuntu-latest
name: Validate metadata.json
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install jsonschema
- run: jsonschema -i metadata.json metadata.schema.json

@ -1,5 +1,5 @@
{ {
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/TRaSH-/Guides/master/metadata.schema.json", "$id": "https://raw.githubusercontent.com/TRaSH-/Guides/master/metadata.schema.json",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
@ -9,8 +9,8 @@
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"radarr": "#/$defs/radarr", "radarr": { "$ref": "#/$defs/radarr" },
"sonarr": "#/$defs/sonarr" "sonarr": { "$ref": "#/$defs/sonarr" }
} }
} }
}, },
@ -27,14 +27,14 @@
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"custom_formats": "#/$defs/custom_formats" "custom_formats": { "$ref": "#/$defs/custom_formats" }
} }
}, },
"sonarr": { "sonarr": {
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"release_profiles": "#/$defs/release_profiles" "release_profiles": { "$ref": "#/$defs/release_profiles" }
} }
} }
} }

Loading…
Cancel
Save