Simple cli tool to deplot swagger definition in kong gateway using Nodejs and oclif framework
- node.js
- Kong
You can install oastokong
either through npm
or by cloning the code from this GitHub repo. This README covers the installation steps with npm
.
- Run the following command in the terminal
$ npm install -g oastokong
Make sure kong Admin APi is runing on the localhost:8001 and Admin api security is disabled.
- Navigate to the location where the swagger file is located Make Sure the swagger file is named as swagger.yaml
- Run the command 'oastokong' This will deploy the API in kong gateway
$ oastokong
- Navigate to the location where the swagger/OAS file is located
- Run the command 'oastokong -n='$file_name' This will deploy the API in kong gateway
Assume that the swagger definition is in a file called my file in Yaml format
$ oastokong -n=myfile.yaml
Credits - oclif framework https://oclif.io