lib/cf-resources/api-gateway-resource/apig-utility.js
function(apiId, swaggerPath) {
        return new Promise(function(resolve, reject) {
            fs.readFile(swaggerPath, function(err, data) {
                if (err) return reject(err);
                
                resolve(APIG.putRestApi({
                    restApiId: apiId,
                    body: data,
                    mode: 'overwrite'
                }).promise());
            });
        });
    }
function(apiId, swaggerPath) {
        return new Promise(function(resolve, reject) {
            fs.readFile(swaggerPath, function(err, data) {
                if (err) return reject(err);
                
                resolve(APIG.putRestApi({
                    restApiId: apiId,
                    body: data,
                    mode: 'overwrite'
                }).promise());
            });
        });
    }
function ( apiId , swaggerPath ) { return new Promise ( function ( resolve , reject ) { fs . readFile ( swaggerPath , function ( err , data ) { if ( err ) return reject ( err ) ; resolve ( APIG . putRestApi ( { restApiId : apiId , body : data , mode : 'overwrite' } ) . promise ( ) ) ; } ) ; } ) ; }
Update an API with a specification from a Swagger file
The update is done in the "overwrite" mode of API Gateway

@return {Promise} which resolves to the updated API
Update an API with a specification from a Swagger file The update is done in the overwrite mode of API Gateway