From 828369c8a99c06dc708b45d0a332e330dd0ab34f Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 27 Feb 2024 17:58:21 -0600 Subject: [PATCH] fix(resources): support xmlns on keyboard3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add xmlns to schema manually For: chore(developer): support xmlns on keyboard3 files 🙀 #10803 --- .../ldml-keyboards/techpreview/fixup-schema.js | 12 ++++++++++++ .../techpreview/ldml-keyboard3.schema.json | 3 +++ .../techpreview/ldml-keyboardtest3.schema.json | 3 +++ 3 files changed, 18 insertions(+) diff --git a/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js b/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js index e1a2d1f393a..4760d24db58 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js +++ b/resources/standards-data/ldml-keyboards/techpreview/fixup-schema.js @@ -51,8 +51,15 @@ function singleToArray(o) { if (data.title.endsWith('ldmlKeyboard3.xsd')) { if (data?.properties?.keyboard3) { data.properties.keyboard3.type = 'object'; + + // add the xmlns property as allowed + if (!data.properties.keyboard3?.properties?.xmlns) { + data.properties.keyboard3.properties.xmlns = { type: 'string' }; + } } + + arrayToSingle(data?.properties?.keyboard3?.properties?.vkeys); singleToArray(data?.definitions?.keys?.properties?.key); singleToArray(data?.definitions?.keys?.properties?.flicks); @@ -83,6 +90,11 @@ if (data.title.endsWith('ldmlKeyboard3.xsd')) { if (data.title.endsWith('ldmlKeyboardTest3.xsd')) { if (data?.properties?.keyboardTest3) { data.properties.keyboardTest3.type = 'object'; + + // support this proactively + if (!data.properties.keyboardTest3?.properties?.xmlns) { + data.properties.keyboardTest3.properties.xmlns = { type: 'string' }; + } } } diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json index 451174050d7..b4861e6d7d9 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json +++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json @@ -675,6 +675,9 @@ }, "version": { "$ref": "#/definitions/version" + }, + "xmlns": { + "type": "string" } }, "required": [ diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json index 476574112be..f9edcd67474 100644 --- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json +++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest3.schema.json @@ -205,6 +205,9 @@ "$ref": "#/definitions/tests" }, "type": "array" + }, + "xmlns": { + "type": "string" } }, "required": [