nox-validation 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/lib/helpers.js +2 -3
  2. package/package.json +1 -1
package/lib/helpers.js CHANGED
@@ -301,7 +301,6 @@ const convertTypes = (field) => {
301
301
  if (type !== schema_definition?.type && schema_definition?.type !== constants.types.ALIAS) {
302
302
  array_type = schema_definition.type;
303
303
  }
304
-
305
304
  return { type, array_type, find_relations };
306
305
  };
307
306
 
@@ -693,7 +692,7 @@ const buildNestedStructure = ({
693
692
 
694
693
  const currentDepth = currentDepthMap.get(isRoot ? item.path : rootPath) || 0;
695
694
 
696
- if (currentDepth >= maxLevel) return;
695
+ // if (currentDepth >= maxLevel) return;
697
696
 
698
697
  let childFields;
699
698
 
@@ -701,7 +700,7 @@ const buildNestedStructure = ({
701
700
  // apiVersion === constants.API_VERSION.V1 ? convertTypesV1(item) : convertTypes(item);
702
701
  // const isUserKey = default_fields.some((field) => item?.path?.includes(field));
703
702
 
704
- if (definedType.find_relations) {
703
+ if (definedType.find_relations && currentDepth<=maxLevel ) {
705
704
  const relationDetail = getForeignCollectionDetails({
706
705
  relations: relations,
707
706
  collection: item?.schema_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {