Skip to content

Commit

Permalink
fix: ignore $schema when create schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Jul 15, 2019
1 parent c823422 commit 881e190
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 2 additions & 0 deletions scripts/build-locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const files = fs.readdirSync(base).filter(f => f.endsWith('.json')).map(f => pat
function discover(dest, src) {
const keys = Object.keys(src);
for (const k of keys) {
// eslint-disable-next-line no-continue
if (k === '$schema') continue;
const v = src[k];
if (typeof v === 'object') {
if (!dest[k]) {
Expand Down
28 changes: 12 additions & 16 deletions static/locale.schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"!delete": {
"type": "string"
},
Expand Down Expand Up @@ -1981,45 +1978,45 @@
"": {
"type": "string"
},
"installLibraries": {
"installAssets": {
"type": "object",
"properties": {
"": {
"type": "string"
},
"library": {
"assets": {
"type": "string"
},
"assetsJson": {
"type": "string"
}
},
"required": [
"",
"library"
"assets",
"assetsJson"
]
},
"installAssets": {
"installLibraries": {
"type": "object",
"properties": {
"": {
"type": "string"
},
"assets": {
"type": "string"
},
"assetsJson": {
"library": {
"type": "string"
}
},
"required": [
"",
"assets",
"assetsJson"
"library"
]
}
},
"required": [
"",
"installLibraries",
"installAssets"
"installAssets",
"installLibraries"
]
},
"installJre": {
Expand Down Expand Up @@ -2678,7 +2675,6 @@
}
},
"required": [
"$schema",
"!delete",
"Invalid credentials. Invalid username or password.",
"acceptingMinecraftVersion",
Expand Down

0 comments on commit 881e190

Please sign in to comment.