apigateway-export
v1.0.1
Published
export a (json) Swagger definition file from AWS API Gateway
Downloads
5
Readme
apigateway-export
Export a (json) Swagger definition file from AWS API Gateway from Node. Implements AWS Signature Version 4.
npm install --save apigateway-export
usage
const fs = require('fs')
const getSpec = require('apigateway-export')
const config = {
"aws_access_key_id": String,
"aws_secret_access_key": String,
"region": String, // ie: us-east-1"
"restApiId": String,
"stage": String
}
getSpec(config, (err, spec) => {
if (err) return console.error(err)
console.log(typeof spec) // -> 'Object'
})