0.1.5 • Published 7 years ago

api2swagger v0.1.5

Weekly downloads
83
License
MIT
Repository
github
Last release
7 years ago

Web Version

We now have an UI version online, Check http://specgen.apistudio.io/

api2swagger

Generate Swagger 2.0 (Open API) spec from Curl like API Call.

Installation

You can install api2swagger either through npm or by cloning and linking the code from GitHub. This document covers the installation details for installing from npm.

Installation from npm

The api2swagger module and its dependencies are designed for Node.js and is available through npm using the following command:

From a Terminal Window:

$ sudo npm install -g api2swagger

Options

EntryExplanation
-e, --endpointRest API Endpoint
-o, --outputSwagger destination location filename
-X, --httpMethodHTTP Method Name - Allowed HEAD, GET, POST, PUT, DELETE
-d, --dataPOST / PUT Data
-H, --headerRequest Headers to be included.
-P, --proxyproxy detail - http://username:password@proxyhost:proxyport

Notes on options

OptionNotes
dataUse single-quotes around a JSON string, and on Windows escape the double-quotes within the string by prepending a / i.e. '{ \"grant_type\" : \"XXYYZZ\" }'
headerQuotes should be used, and multiple headers can be specified by giving multiple -H entries

Examples

$ api2swagger -e "https://accounts.apigee.com/status" -X GET -o /Users/Anil/Desktop/sampleSwagger.json

Articles

Getting Started with API2Swagger - Api2Swagger : Open API (Swagger) 2.0 Spec Generator - Command line tool

0.1.5

7 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago