diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-05-22 15:45:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 15:45:20 -0400 |
commit | d16739a83a20e1729e08dbcbbc155be15972d146 (patch) | |
tree | f7c12fa946a688750365ecf0f66227fcad4f927d /dev/schema-validate.js | |
parent | b48052ff320f1a68aac317158c4c757a70b14f04 (diff) |
Json schema validation improvements (#1697)
* Create new JsonSchema class
* Add proxy handler
* Update tests
* Update validation scripts
* Update backend
* Update audio downloader
* Update options util
* Update dictionary importer
* Update json schema file reference
* Remove old json-schema.js
* Rename new json-schema.js
* Update file names
* Rename class
Diffstat (limited to 'dev/schema-validate.js')
-rw-r--r-- | dev/schema-validate.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/schema-validate.js b/dev/schema-validate.js index 45285700..77fbd0c8 100644 --- a/dev/schema-validate.js +++ b/dev/schema-validate.js @@ -25,7 +25,7 @@ vm.execute([ 'js/general/cache-map.js', 'js/data/json-schema.js' ]); -const JsonSchemaValidator = vm.get('JsonSchemaValidator'); +const JsonSchema = vm.get('JsonSchema'); function main() { @@ -47,7 +47,7 @@ function main() { console.log(`Validating ${dataFileName}...`); const dataSource = fs.readFileSync(dataFileName, {encoding: 'utf8'}); const data = JSON.parse(dataSource); - new JsonSchemaValidator().validate(data, schema); + new JsonSchema(schema).validate(data); const end = performance.now(); console.log(`No issues detected (${((end - start) / 1000).toFixed(2)}s)`); } catch (e) { |