diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-08-06 01:18:28 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 19:06:04 -0400 |
commit | 2cc183b48ba33488f3f475a0ab4d931ee6cf2d58 (patch) | |
tree | 41e49749809f2a5c3575d17d2f2d6184eaeaaf46 /src/SMAPI.Web/wwwroot/schemas | |
parent | d88d3505ec75c3633cdd5d57058a5d290e558dfb (diff) | |
download | SMAPI-2cc183b48ba33488f3f475a0ab4d931ee6cf2d58.tar.gz SMAPI-2cc183b48ba33488f3f475a0ab4d931ee6cf2d58.tar.bz2 SMAPI-2cc183b48ba33488f3f475a0ab4d931ee6cf2d58.zip |
tweak manifest schema to allow $schema field, fix parse errors in some text editors (#654)
Diffstat (limited to 'src/SMAPI.Web/wwwroot/schemas')
-rw-r--r-- | src/SMAPI.Web/wwwroot/schemas/manifest.json | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/SMAPI.Web/wwwroot/schemas/manifest.json b/src/SMAPI.Web/wwwroot/schemas/manifest.json index d4727eda..685b515b 100644 --- a/src/SMAPI.Web/wwwroot/schemas/manifest.json +++ b/src/SMAPI.Web/wwwroot/schemas/manifest.json @@ -102,14 +102,21 @@ "pattern": "^(Chucklefish:\\d+|Nexus:\\d+|GitHub:[A-Za-z0-9_]+/[A-Za-z0-9_]+|ModDrop:\\d+)$", "@errorMessages": { "pattern": "Invalid update key; see https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Update_checks for more info." - } + } } + }, + "$schema": { + "title": "Schema", + "description": "A reference to this JSON schema. Not part of the actual format, but useful for validation tools.", + "type": "string", + "const": "https://smapi.io/schemas/manifest.json" } }, "definitions": { "SemanticVersion": { "type": "string", - "pattern": "^(?>(?<major>0|[1-9]\\d*))\\.(?>(?<minor>0|[1-9]\\d*))(?>(?:\\.(?<patch>0|[1-9]\\d*))?)(?:-(?<prerelease>(?>[a-zA-Z0-9]+[\\-\\.]?)+))?$", // derived from SMAPI.Toolkit.SemanticVersion + "pattern": "^(?>(?:0|[1-9]\\d*))\\.(?>(?:0|[1-9]\\d*))(?>(?:\\.(?:0|[1-9]\\d*))?)(?:-(?:(?>[a-zA-Z0-9]+[\\-\\.]?)+))?$", + "$comment": "derived from SMAPI.Toolkit.SemanticVersion", "examples": [ "1.0.0", "1.0.1-beta.2" ], "@errorMessages": { "pattern": "Invalid semantic version; must be formatted like 1.2.0 or 1.2.0-prerelease.tags. See https://semver.org/ for more info." @@ -117,7 +124,8 @@ }, "ModID": { "type": "string", - "pattern": "^[a-zA-Z0-9_.-]+$", // derived from SMAPI.Toolkit.Utilities.PathUtilities.IsSlug + "pattern": "^[a-zA-Z0-9_.-]+$", + "$comment": "derived from SMAPI.Toolkit.Utilities.PathUtilities.IsSlug", "examples": [ "Pathoschild.LookupAnything" ] } }, |