package
Parser/validator for OpenAPI 3.x definitions
npm install oas-validatorGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Usage:
const validator = require('oas-validator');
const options = {};
validator.validate(openapi, options)
.then(function(options){
// options.valid contains the result of the validation, true in this branch
})
.catch(function(err){
console.warn(err.message);
if (options.context) console.warn('Location',options.context.pop());
});If a third callback argument to validate is provided, the callback will be called instead of a Promise being returned.
oas-validator is an assertion-based validator, which stops on the first error, as structural errors may otherwise cause further (spurious) errors to be reported. If the lint option is set, multiple warnings may be reported.
See here for complete documentation of the options object.
Estimated unpacked size across 25 packages.
2.0 MB
Includes dependencies.
8 direct · 1 outdated
^1.10.0
2.9.1
^13.2.1
13.2.3
^1.1.9
1.1.9
^3.2.2
3.2.2
^2.5.6
2.5.6