We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 754ff8d commit 3dd8797Copy full SHA for 3dd8797
1 file changed
search_dataset_schema.js
@@ -28,8 +28,6 @@ const leaf_schema = z.object({
28
value: leaf_value_schema,
29
});
30
31
-// Build the filter node schema with a hard nesting cap (max depth 3).
32
-// At max depth, only leaf nodes are allowed.
33
function build_node_schema(depth){
34
if (depth<=1)
35
return leaf_schema;
@@ -40,8 +38,6 @@ function build_node_schema(depth){
40
38
return z.union([group_schema, leaf_schema]);
41
39
}
42
43
-// depth param counts schema layers incl. the leaf layer, so the value is
44
-// MAX_NESTING + 1 to allow exactly MAX_NESTING levels of group nesting.
45
const MAX_NESTING = 3;
46
export const filter_schema = build_node_schema(MAX_NESTING+1);
47
0 commit comments