How to use the api-spec-converter/package.json.version function in api-spec-converter

To help you get started, we’ve selected a few api-spec-converter 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 APIs-guru / openapi-directory / scripts / collection.js View on Github external
#!/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) {

api-spec-converter

Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis