Skip to content

Commit 15df708

Browse files
authored
fix: migrate Foundry VTT manifests to strict validation (SchemaStore#6306)
Signed-off-by: Solaris-star <820622658@qq.com>
1 parent 90bbd91 commit 15df708

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

src/schema-validation.jsonc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@
9797
"feed-1.json",
9898
"feed.json",
9999
"flatpak-manifest.json",
100-
"foundryvtt-module-manifest.json",
101-
"foundryvtt-system-manifest.json",
102-
"foundryvtt-world-manifest.json",
103100
"gaspar-1.0.json",
104101
"gaspar-3.0.json",
105102
"helmfile.json",

src/schemas/json/foundryvtt-module-manifest.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://json.schemastore.org/foundryvtt-module-manifest.json",
4+
"description": "JSON Schema for a Foundry Virtual Tabletop module manifest.\nhttps://foundryvtt.com/article/module-development/",
45
"allOf": [
56
{
67
"$ref": "foundryvtt-base-package-manifest.json#"
78
}
89
],
910
"properties": {
1011
"manifest": {
11-
"$ref": "foundryvtt-base-package-manifest.json#/definitions/URL",
12-
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic module installation in the Foundry VTT setup screen. This manifest URL is consulted during the module update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.",
12+
"format": "uri",
13+
"type": "string",
14+
"title": "Manifest URL",
15+
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic module installation in the Foundry VTT setup screen. This manifest URL is consulted during the module update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.\nhttps://foundryvtt.com/article/module-development/",
1316
"pattern": ".*module\\.json",
1417
"examples": [
1518
"https://gitlab.com/tposney/dae/raw/master/package/module.json"
1619
]
1720
},
1821
"library": {
19-
"description": "The library field is a boolean that indicates whether the package is a library intended for other packages to depend on and consume. This field should be true if your package does not present any user-facing features, but rather provides functionality for other packages to utilize and rely upon. Packages with this field set to true may be hidden from third party package lists to avoid confusing users. When omitted the default value of this field is false.",
22+
"title": "Library",
23+
"description": "The library field is a boolean that indicates whether the package is a library intended for other packages to depend on and consume. This field should be true if your package does not present any user-facing features, but rather provides functionality for other packages to utilize and rely upon. Packages with this field set to true may be hidden from third party package lists to avoid confusing users. When omitted the default value of this field is false.\nhttps://foundryvtt.com/article/module-development/",
2024
"type": "boolean",
2125
"default": false
2226
},
2327
"coreTranslation": {
24-
"description": "(undocumented)",
28+
"title": "Core Translation",
29+
"description": "Whether this module provides translations for Foundry Virtual Tabletop core content.\nhttps://foundryvtt.com/article/module-development/",
2530
"type": "boolean",
2631
"default": false
2732
}

src/schemas/json/foundryvtt-system-manifest.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://json.schemastore.org/foundryvtt-system-manifest.json",
4+
"description": "JSON Schema for a Foundry Virtual Tabletop game system manifest.\nhttps://foundryvtt.com/article/system-development/",
45
"allOf": [
56
{
67
"$ref": "foundryvtt-base-package-manifest.json#"
78
}
89
],
910
"properties": {
1011
"manifest": {
11-
"$ref": "foundryvtt-base-package-manifest.json#/definitions/URL",
12-
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic system installation in the Foundry VTT setup screen. This manifest URL is consulted during the system update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.",
12+
"format": "uri",
13+
"type": "string",
14+
"title": "Manifest URL",
15+
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic system installation in the Foundry VTT setup screen. This manifest URL is consulted during the system update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.\nhttps://foundryvtt.com/article/system-development/",
1316
"pattern": ".*system\\.json",
1417
"examples": [
1518
"https://raw.githubusercontent.com/foundryvtt/worldbuilding/master/system.json"

src/schemas/json/foundryvtt-world-manifest.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "https://json.schemastore.org/foundryvtt-world-manifest.json",
4+
"description": "JSON Schema for a Foundry Virtual Tabletop world manifest.\nhttps://foundryvtt.com/article/worlds/",
45
"allOf": [
56
{
67
"$ref": "foundryvtt-base-package-manifest.json#"
78
}
89
],
910
"properties": {
1011
"manifest": {
11-
"$ref": "foundryvtt-base-package-manifest.json#/definitions/URL",
12-
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic world installation in the Foundry VTT setup screen. This manifest URL is consulted during the module update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.",
12+
"format": "uri",
13+
"type": "string",
14+
"title": "Manifest URL",
15+
"description": "A stable URL that describes the latest release version of your manifest file. This URL is used for automatic world installation in the Foundry VTT setup screen. This manifest URL is consulted during the module update check to see whether a new version is available for download. It is important that this address remain stable, otherwise updates will not be detected.\nhttps://foundryvtt.com/article/worlds/",
1316
"pattern": ".*world\\.json",
1417
"examples": [
1518
"https://github.com/ForgeVTT/forgevtt-demo-world/releases/latest/download/world.json"

0 commit comments

Comments
 (0)