Skip to content

Commit

Permalink
Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrixroa committed Mar 11, 2021
1 parent 7648e07 commit cd4c595
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: test run

run:
node -r ts-node/register src/index
node -r ts-node/register src/helper

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swagger-aws-api-gateway",
"version": "1.0.4",
"version": "1.1.0",
"description": "Module to add aws api gateway integration to a swagger file",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions src/helper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { readFileSync, writeFileSync } from "fs";
import { APIGatewayIntegrator } from './apigateway.integrator';

const data = readFileSync('src/input.json').toString();
const apiGWInstance = new APIGatewayIntegrator(JSON.parse(data));
apiGWInstance.addIntegration().then(res => writeFileSync('out.json', JSON.stringify(res)))
.catch(err => console.error(err));
1 change: 1 addition & 0 deletions src/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "tbd": "tbd" }

0 comments on commit cd4c595

Please sign in to comment.