Skip to content

Simple CLI tool to deploy an API in kong-gateway by providing a swagger file

Notifications You must be signed in to change notification settings

VimukthiMayadunne/oastokong

Repository files navigation

Swagger to Kong Admin

Simple cli tool to deplot swagger definition in kong gateway using Nodejs and oclif framework

oclif Version License JavaScript Style Guide Downloads/week

Pre-requisite

  • node.js
  • Kong

Installation

You can install oastokong either through npm or by cloning the code from this GitHub repo. This README covers the installation steps with npm.

Setup

  1. Run the following command in the terminal
$ npm install -g oastokong

Runnig the Cli-Tool

Make sure kong Admin APi is runing on the localhost:8001 and Admin api security is disabled.

1st Methord

  1. Navigate to the location where the swagger file is located Make Sure the swagger file is named as swagger.yaml
  2. Run the command 'oastokong' This will deploy the API in kong gateway

Example

$ oastokong

2nd Methord

  1. Navigate to the location where the swagger/OAS file is located
  2. Run the command 'oastokong -n='$file_name' This will deploy the API in kong gateway

Example

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

About

Simple CLI tool to deploy an API in kong-gateway by providing a swagger file

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published