How to use the oav.validateExamples function in oav

To help you get started, we’ve selected a few oav 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 Azure / azure-rest-api-specs / test / model.js View on Github external
it(swagger + ' should have valid examples.', function (done) {
      oav.validateExamples(swagger, null, {consoleLogLevel: 'error'}).then(function (validationResult) {
        //console.dir(validationResult, {depth: null, colors: true});
        done(assert(validationResult.validityStatus === true, `swagger "${swagger}" contains model validation errors.`));
      }).catch(function (err) {
        console.dir(err, {depth: null, colors: true});
        done(err);
      });
    });
  }).value();

oav

Validate Azure REST API Specifications

MIT
Latest version published 20 days ago

Package Health Score

84 / 100
Full package analysis