lib/cf-resources/api-gateway-resource/apig-utility.js
function(apiName, swaggerPath) {
        return new Promise(function(resolve, reject) {
            fs.readFile(swaggerPath, function(err, data) {
                if (err) return reject(err);
                
                resolve(APIG.importRestApi({
                    body: data,
                    failOnWarnings: false
                }).promise());
            });
        });
    }
function(apiName, swaggerPath) {
        return new Promise(function(resolve, reject) {
            fs.readFile(swaggerPath, function(err, data) {
                if (err) return reject(err);
                
                resolve(APIG.importRestApi({
                    body: data,
                    failOnWarnings: false
                }).promise());
            });
        });
    }
function ( apiName , swaggerPath ) { return new Promise ( function ( resolve , reject ) { fs . readFile ( swaggerPath , function ( err , data ) { if ( err ) return reject ( err ) ; resolve ( APIG . importRestApi ( { body : data , failOnWarnings : false } ) . promise ( ) ) ; } ) ; } ) ; }
Create a new API instance from a Swagger file

@return {Promise} which resolves to the newly created API instance
Create a new API instance from a Swagger file