@apify/input_schema 3.18.4 → 3.19.0
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/cjs/index.cjs +2 -2
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.ts +5 -2
- package/esm/index.d.mts +5 -2
- package/esm/index.mjs +2 -2
- package/esm/index.mjs.map +1 -1
- package/package.json +2 -2
package/cjs/index.cjs
CHANGED
|
@@ -1679,7 +1679,7 @@ function parseAjvError(error, rootName, properties = {}, input = {}) {
|
|
|
1679
1679
|
return name.replace(/^\/|\/$/g, "").replace(/\//g, ".");
|
|
1680
1680
|
}, "cleanPropertyName");
|
|
1681
1681
|
if (error.keyword === "type") {
|
|
1682
|
-
fieldKey = error.instancePath
|
|
1682
|
+
fieldKey = cleanPropertyName(error.instancePath);
|
|
1683
1683
|
if (properties[fieldKey] && properties[fieldKey].nullable && input[fieldKey] === null) {
|
|
1684
1684
|
return null;
|
|
1685
1685
|
}
|
|
@@ -1742,7 +1742,7 @@ function validateField(validator, fieldSchema, fieldKey, isSubField = false) {
|
|
|
1742
1742
|
if (fieldSchema.enum) {
|
|
1743
1743
|
const definition2 = matchingDefinitions.filter((item) => !!item.properties.enum).pop();
|
|
1744
1744
|
if (!definition2) throw new Error('Input schema validation failed to find "enum property" definition');
|
|
1745
|
-
validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}
|
|
1745
|
+
validateAgainstSchemaOrThrow(validator, fieldSchema, enhanceDefinition(definition2), `schema.properties.${fieldKey}`);
|
|
1746
1746
|
return;
|
|
1747
1747
|
}
|
|
1748
1748
|
if (fieldSchema.resourceType) {
|