Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setupOptions(options,openapi) {
options.valid = false;
options.context = [ '#/' ];
options.warnings = [];
if (!options.lintLimit) options.lintLimit = 5;
if (!options.lintSkip) options.lintSkip = [];
options.operationIds = [];
options.allScopes = {};
options.openapi = openapi;
if (options.lint && !options.linter) {
options.linter = linter.lint;
linter.loadDefaultRules();
options.linterResults = linter.getResults;
}
if (!options.cache) options.cache = {};
options.schema = openapi3Schema;
options.metadata = { lines: -1 };
if (options.text) options.metadata.lines = options.text.split('\n').length;
options.ajv = ajv;
}
function setupOptions(options,openapi) {
options.valid = false;
options.context = [ '#/' ];
options.warnings = [];
if (!options.lintLimit) options.lintLimit = 5;
if (!options.lintSkip) options.lintSkip = [];
options.operationIds = [];
options.allScopes = {};
options.openapi = openapi;
if (options.lint && !options.linter) {
options.linter = linter.lint;
linter.loadDefaultRules();
options.linterResults = linter.getResults;
}
if (!options.cache) options.cache = {};
options.schema = openapi3Schema;
options.metadata = { lines: -1 };
if (options.text) options.metadata.lines = options.text.split('\n').length;
options.ajv = ajv;
}
function setupOptions(options,openapi) {
options.valid = false;
options.context = [ '#/' ];
options.warnings = [];
if (!options.lintLimit) options.lintLimit = 5;
if (!options.lintSkip) options.lintSkip = [];
options.operationIds = [];
options.allScopes = {};
options.openapi = openapi;
if (options.lint && !options.linter) {
options.linter = linter.lint;
linter.loadDefaultRules();
options.linterResults = linter.getResults;
}
if (!options.cache) options.cache = {};
options.schema = openapi3Schema;
options.metadata = { lines: -1 };
if (options.text) options.metadata.lines = options.text.split('\n').length;
options.ajv = ajv;
}