ata-validator 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/js-compiler.js +1 -1
- package/package.json +1 -1
package/lib/js-compiler.js
CHANGED
|
@@ -786,7 +786,7 @@ function genCode(schema, v, lines, ctx, knownType) {
|
|
|
786
786
|
if (reqChecks.length > 0) {
|
|
787
787
|
lines.push(`if(${reqChecks.join('||')})return false`)
|
|
788
788
|
}
|
|
789
|
-
} else if (schema.required) {
|
|
789
|
+
} else if (schema.required && schema.required.length > 0) {
|
|
790
790
|
if (isObj) {
|
|
791
791
|
const checks = schema.required.map(key => `${v}[${JSON.stringify(key)}]===undefined`)
|
|
792
792
|
lines.push(`if(${checks.join('||')})return false`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ata-validator",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Ultra-fast JSON Schema validator. 4.7x faster validation, 1,800x faster compilation. Works without native addon. Cross-schema $ref, Draft 2020-12 + Draft 7, V8-optimized JS codegen, simdjson, RE2, multi-core. Standard Schema V1 compatible.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|