code: function optionalResolve(options) {
      setupOptions(options);
      return new Promise(function (res, rej) {
          if (options.resolve)
              loopReferences(options, res, rej)
          else
              res(options);
      });
  }
docs: compatibility function for swagger2openapi