index.js
function returnClient(options, ignoreCache) {
  if (typeof options === 'string') {
    options = {
      url: options,
      usePromise: true
    };
  }

  if (ignoreCache === true) {
    return generateClient(options);
  }

  const optionsJSON = JSON.stringify(options);
  if (cachedClients[optionsJSON] instanceof Swagger) {
    return cachedClients[optionsJSON];
  } else {
    cachedClients[optionsJSON] = generateClient(options);
    return cachedClients[optionsJSON];
  }
}
function returnClient(options, ignoreCache) {
  if (typeof options === 'string') {
    options = {
      url: options,
      usePromise: true
    };
  }

  if (ignoreCache === true) {
    return generateClient(options);
  }

  const optionsJSON = JSON.stringify(options);
  if (cachedClients[optionsJSON] instanceof Swagger) {
    return cachedClients[optionsJSON];
  } else {
    cachedClients[optionsJSON] = generateClient(options);
    return cachedClients[optionsJSON];
  }
}
function returnClient ( options , ignoreCache ) { if ( typeof options === 'string' ) { options = { url : options , usePromise : true } ; } if ( ignoreCache === true ) { return generateClient ( options ) ; } const optionsJSON = JSON . stringify ( options ) ; if ( cachedClients [ optionsJSON ] instanceof Swagger ) { return cachedClients [ optionsJSON ] ; } else { cachedClients [ optionsJSON ] = generateClient ( options ) ; return cachedClients [ optionsJSON ] ; } }
Create a swagger-client synchronously.

@param {String|Object} options URL to swagger specification or object with options that will be passed to swagger-client constructor.
@param {Boolean=} ignoreCache Created new swagger-client and don't cache it (default: false).
Create a swagger - client synchronously .