[Downloader] Add schema validation to info.json file processing (#3533)

* schema v1

* set hidden to True for shared libs

* fix test data

* add warning about invalid top-level structure

* don't show full traceback for JSONDecodeError
This commit is contained in:
jack1142
2020-02-15 06:18:47 +01:00
committed by GitHub
parent ed6d012e6c
commit 78192dc1af
4 changed files with 284 additions and 130 deletions

View File

@@ -88,7 +88,7 @@ INFO_JSON = {
"hidden": False,
"install_msg": "A post-installation message",
"required_cogs": {},
"requirements": ("tabulate"),
"requirements": ("tabulate",),
"short": "A short description",
"tags": ("tag1", "tag2"),
"type": "COG",
@@ -102,7 +102,7 @@ LIBRARY_INFO_JSON = {
"hidden": False, # libraries are always hidden, this tests it will be flipped
"install_msg": "A library install message",
"required_cogs": {},
"requirements": ("tabulate"),
"requirements": ("tabulate",),
"short": "A short library description",
"tags": ("libtag1", "libtag2"),
"type": "SHARED_LIBRARY",