docs: function annotateAPIs(listOfApis, callback) {
    logger.debug('annotate API metadatas');
  
    async.each(
      listOfApis,
      function(api, next) {
        // populate 'document-wo-assembly'
        // Some customers add their own extension to the swagger,
        // so we will make the swagger available in context to customers.
        var swaggerWithoutAssembly = cloneJSON(api.document);
        if (swaggerWithoutAssembly['x-ibm-configuration']) {
          delete swaggerWithoutAssembly['x-ibm-configuration'].assembly;
        }
        api['document-wo-assembly'] = swaggerWithoutAssembly;
  
        // populate 'document-resolved'
        jsonRefs.resolveRefs(api.document)
          .then(function(res) {
            // saved the resolved swagger document if any JSON ref in it;
            if (Object.keys(res.refs).length > 0) {
              logger.debug('store resolved API swagger document');
              api['document-resolved'] = res.resolved;
            }
          }, function(err) {
            // error when resolving json-refs
            logger.debug('error when resolving JSON references: %j', err);
          })
          .then(next, next); // end of jsonRefs promise resolution
      },
      function(err) {
        logger.debug('All API swaggers have been annotated');
        callback(err);
      }
    ); // end of async.each() call
  }