Skip to content

Commit

Permalink
fix(resources): support xmlns on keyboard3
Browse files Browse the repository at this point in the history
- add xmlns to schema manually

For: chore(developer): support xmlns on keyboard3 files 🙀  #10803
  • Loading branch information
srl295 committed Feb 27, 2024
1 parent db32e40 commit 828369c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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' };
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@
},
"version": {
"$ref": "#/definitions/version"
},
"xmlns": {
"type": "string"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
"$ref": "#/definitions/tests"
},
"type": "array"
},
"xmlns": {
"type": "string"
}
},
"required": [
Expand Down

0 comments on commit 828369c

Please sign in to comment.