How to use zapier-platform-schema - 2 common examples

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);
};
github zapier / zapier-platform-core / src / tools / create-lambda-handler.js View on Github external
const isRequestOrFunction = obj => {
  return (
    RequestSchema.validate(obj).valid || FunctionSchema.validate(obj).valid
  );
};

zapier-platform-schema

Schema definition for CLI apps in the Zapier Developer Platform.

SEE LICENSE IN LICENSE
Latest version published 2 days ago

Package Health Score

87 / 100
Full package analysis