From 38a76b5108f679fedb0032a1d70bd8ca89f47283 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 22 May 2021 11:24:34 -0400 Subject: allow comments and trailing commas in schemas for VSCode The `allowComments` and `allowTrailingCommas` fields are VSCode-specific extensions to JSON Schema. --- src/SMAPI.Web/wwwroot/schemas/i18n.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Web/wwwroot/schemas/i18n.json') diff --git a/src/SMAPI.Web/wwwroot/schemas/i18n.json b/src/SMAPI.Web/wwwroot/schemas/i18n.json index 493ad213..313daa59 100644 --- a/src/SMAPI.Web/wwwroot/schemas/i18n.json +++ b/src/SMAPI.Web/wwwroot/schemas/i18n.json @@ -4,8 +4,11 @@ "title": "SMAPI i18n file", "description": "A translation file for a SMAPI mod or content pack.", "@documentationUrl": "https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Translation", - "type": "object", + "allowComments": true, + "allowTrailingCommas": true, + + "type": "object", "properties": { "$schema": { "title": "Schema", -- cgit From dfa3beb6a6ba09d350aecc5bc3a8db3f2bd99ab7 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 28 May 2021 20:24:29 -0400 Subject: fix i18n schema requiring wrong $schema value --- docs/release-notes.md | 3 ++- src/SMAPI.Web/wwwroot/schemas/i18n.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/SMAPI.Web/wwwroot/schemas/i18n.json') diff --git a/docs/release-notes.md b/docs/release-notes.md index b7b053b8..3475a26a 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -16,7 +16,8 @@ * Added `World.FurnitureListChanged` event (thanks to DiscipleOfEris!). * Added asset propagation for building/house paint masks. * Added validation for the manifest `Dependencies` field. - * When using Visual Studio Code to edit JSON files [with a SMAPI JSON schema](technical/web.md#using-a-schema-file-directly), it will no longer warn about comments or trailing commas. + * Fixed [JSON schema](technical/web.md#using-a-schema-file-directly) in Visual Studio Code warning about comments or trailing commas. + * Fixed JSON schema for `i18n` files requiring the wrong value for the `$schema` field. * Fixed validation for mods with version `0.0.0`. * Fixed _loaded with custom settings_ trace log when using default settings. diff --git a/src/SMAPI.Web/wwwroot/schemas/i18n.json b/src/SMAPI.Web/wwwroot/schemas/i18n.json index 313daa59..36c04890 100644 --- a/src/SMAPI.Web/wwwroot/schemas/i18n.json +++ b/src/SMAPI.Web/wwwroot/schemas/i18n.json @@ -14,7 +14,7 @@ "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" + "const": "https://smapi.io/schemas/i18n.json" } }, -- cgit