How to use the metaschema.extractByPath function in metaschema

To help you get started, we’ve selected a few metaschema examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github metarhia / globalstorage / lib / metaschema-config / utils.js View on Github external
);
      } else {
        field.definition = cat.definition;
      }
    } else if (typeof field === 'string') {
      const src = `${source}.${key}`;
      if (!category) {
        errors.push(
          new SchemaValidationError('illegalParamsResolving', src, {
            type: 'publicAction',
          })
        );
        continue;
      }
      try {
        const def = extractByPath(category, field.field, ms, src);
        Object.assign(field, def);
      } catch (error) {
        errors.push(error);
      }
    }
  }

  return errors;
};

metaschema

Metadata Schema and Interface Definition Language (IDL)

MIT
Latest version published 4 months ago

Package Health Score

71 / 100
Full package analysis