api2swagger
Generate Swagger 2.0 (Open API) spec from Curl like API Call.
Last updated 3 years ago by anil614sagar .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install api2swagger 
SYNC missed versions from official npm registry.

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

Entry Explanation
-e, --endpoint Rest API Endpoint
-o, --output Swagger destination location filename
-X, --httpMethod HTTP Method Name - Allowed HEAD, GET, POST, PUT, DELETE
-d, --data POST / PUT Data
-H, --header Request Headers to be included.
-P, --proxy proxy detail - http://username:password@proxyhost:proxyport

Notes on options

Option Notes
data Use single-quotes around a JSON string, and on Windows escape the double-quotes within the string by prepending a / i.e. '{ "grant_type" : "XXYYZZ" }'
header Quotes 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

Current Tags

  • 0.1.5                                ...           latest (3 years ago)

7 Versions

  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.1                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |