How to use the zapier-platform-schema.validateAppDefinition function in zapier-platform-schema

To help you get started, we’ve selected a few zapier-platform-schema 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 zapier / zapier-platform-core / src / tools / schema.js View on Github external
const validateApp = (compiledApp) => {
  const cleanedApp = cleaner.recurseCleanFuncs(compiledApp);
  const results = zapierSchema.validateAppDefinition(cleanedApp);

  // Check for style guide only if there are no schema errors
  if (results.errors.length === 0) {
    // These aren't ValidationError so it won't "stop" validation, but it will show them in `zapier validate`
    const styleGuideResults = styleGuideChecker.validateAppDefinition(cleanedApp);
    return dataTools.jsonCopy(styleGuideResults.errors);
  }

  return dataTools.jsonCopy(results.errors);
};

zapier-platform-schema

Schema definition for CLI apps in the Zapier Developer Platform.

SEE LICENSE IN LICENSE
Latest version published 6 days ago

Package Health Score

87 / 100
Full package analysis