Skip to content

Commit

Permalink
Rework JSON validation
Browse files Browse the repository at this point in the history
  • Loading branch information
heyhippari committed Mar 13, 2021
1 parent a9b6e02 commit 3d62bde
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 69 deletions.
143 changes: 76 additions & 67 deletions .github/studios.schema.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,81 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Jellyfin studio artwork",
"description": "A set of artwork for studios, used by Jellyfin",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Jellyfin studio artwork",
"description": "A set of artwork for studios, used by Jellyfin",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Standard name of the studio, network or label in English",
"type": "string"
},
"providers": {
"type": "object",
"description": "Identifiers for various metadata providers",
"properties": {
"name": {
"description": "Standard name of the studio, network or label in English",
"type": "string"
},
"providers": {
"type": "object",
"description": "Identifiers for various metadata providers",
"properties": {
"tvdb": {
"description": "Identifier of the network on TVDB",
"type": "string"
},
"tmdb": {
"description": "Identifier of the network or studio on TheMovieDB",
"type": "string"
},
"imdb": {
"description": "Identifier of the company on IMDB",
"type": "string"
},
"musicbrainz": {
"description": "Identifier of the label on MusicBrainz",
"type": "string"
},
"anidb": {
"description": "Identifier of the studio on AniDB",
"type": "string"
},
"anilist": {
"description": "Identifier of the studio on AniList",
"type": "string"
},
"additionalProperties": true
}
},
"artwork": {
"type": "object",
"properties": {
"primary": {
"type": "string"
},
"thumb": {
"type": "string"
},
"logo": {
"type": "string"
},
"backdrop": {
"type": "string"
}
},
"required": [
"primary",
"thumb"
]
"tvdb": {
"description": "Identifier of the network on TVDB",
"type": "string"
},
"tmdb": {
"description": "Identifier of the network or studio on TheMovieDB",
"type": "string"
},
"imdb": {
"description": "Identifier of the company on IMDB",
"type": "string"
},
"musicbrainz": {
"description": "Identifier of the label on MusicBrainz",
"type": "string"
},
"anidb": {
"description": "Identifier of the studio on AniDB",
"type": "string"
},
"anilist": {
"description": "Identifier of the studio on AniList",
"type": "string"
},
"additionalProperties": true
}
},
"artwork": {
"type": "object",
"properties": {
"primary": {
"type": "array",
"items": {
"type": "string",
"enum": ["webp", "svg"]
}
},
"thumb": {
"type": "array",
"items": {
"type": "string",
"enum": ["webp", "svg"]
}
},
"logo": {
"type": "array",
"items": {
"type": "string",
"enum": ["webp", "svg"]
}
},
"backdrop": {
"type": "array",
"items": {
"type": "string",
"enum": ["webp", "svg"]
}
}
},
"required": [
"name",
"providers",
"artwork"
]
}
}
"required": ["primary", "thumb"]
}
},
"required": ["name", "providers", "artwork"]
}
}
2 changes: 1 addition & 1 deletion .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: cd dist; zip -r -D ../release.zip *; cd ..
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
repo_token: "${{ secrets.GH_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate_json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
json_schema: .github/studios.schema.json
json_path_pattern: studios.json
json_path_pattern: studios/.*/studio.json$

0 comments on commit 3d62bde

Please sign in to comment.