Skip to content

Commit 0a14070

Browse files
committed
dist: update
1 parent ead6d84 commit 0a14070

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

dist/jsonSchemaLibrary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/module/src/keywords/dependencies.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export function reduceDependencies({ node, data, key, pointer, path }) {
6969
if (!isSchemaNode(dependency)) {
7070
return true;
7171
}
72+
if (Array.isArray(dependency.schema.required)) {
73+
required.push(...dependency.schema.required);
74+
}
7275
// @note pass on updated required-list to resolve nested dependencies. This is currently supported,
7376
// but probably not how json-schema spec defines this behaviour (resolve only within sub-schema)
7477
const reducedDependency = { ...dependency, schema: { ...dependency.schema, required } }.reduceNode(data, {
@@ -77,9 +80,6 @@ export function reduceDependencies({ node, data, key, pointer, path }) {
7780
path
7881
}).node;
7982
workingNode = mergeNode(workingNode, reducedDependency);
80-
if (workingNode.schema.required) {
81-
required.push(...workingNode.schema.required);
82-
}
8383
// @dynamicId
8484
const nestedDynamicId = (_b = (_a = reducedDependency.dynamicId) === null || _a === void 0 ? void 0 : _a.replace(node.dynamicId, "")) !== null && _b !== void 0 ? _b : "";
8585
const localDynamicId = nestedDynamicId === "" ? `dependencies/${propertyName}` : nestedDynamicId;
@@ -89,9 +89,6 @@ export function reduceDependencies({ node, data, key, pointer, path }) {
8989
if (workingNode === node) {
9090
return node;
9191
}
92-
// mergedSchema = mergeSchema(node.schema, mergedSchema, "dependencies");
93-
// const { node: childNode, error } = node.compileSchema(mergedSchema, node.evaluationPath).reduceNode(data, { path });
94-
// return childNode ?? error;
9592
if (required.length === 0) {
9693
return workingNode;
9794
}

0 commit comments

Comments
 (0)