Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
'use strict';
const assert = require('assert');
const fs = require('fs');
const url = require('url');
const pathLib = require('path');
const utilLib = require('util');
const _ = require('lodash');
const jp = require('json-pointer');
const jsonPath = require('jsonpath');
const converter = require('api-spec-converter');
const converterVersion = require('api-spec-converter/package.json').version;
const parseDomain = require('parse-domain');
const jsonPatch = require('json-merge-patch');
const jiff = require('jiff');
const YAML = require('js-yaml');
const Promise = require('bluebird');
const recurse = require('reftools/lib/recurse.js').recurse;
const makeRequest = require('makeRequest');
const util = require('./util');
const specSources = require('./spec_sources');
const sp = require('./sortParameters.js');
var httpCache;
try {
httpCache = YAML.safeLoad(fs.readFileSync(pathLib.join(__dirname,'../metadata/httpCache.yaml'),'utf8'));
}
catch (ex) {