Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/binded/build-swagger

build-swagger
https://github.com/binded/build-swagger

Last synced: about 5 hours ago
JSON representation

build-swagger

Awesome Lists containing this project

README

        

# build-swagger

[![Build Status](https://travis-ci.org/blockai/build-swagger.svg?branch=master)](https://travis-ci.org/blockai/build-swagger)

Simple wrapper around [swagger-jsdoc](https://github.com/Surnet/swagger-jsdoc)

Builds a swagger.json based on a swagger.js specification file. By
default, tries to find `swagger.js` in `./swagger.js` and
`./src/swagger.js` and writes to `./swagger.json`.

## Install

```bash
npm install --save build-swagger
```

Requires Node v6+

## Usage

See [./test](./test) directory for usage examples.

```bash
build-swagger [--spec] [--jsonPath]
# by default, spec looks for ./swagger.js or ./src/swagger.js
# if jsonPath is not specified, it will output to stdout

# example:
build-swagger.js --spec ./src/swagger.js --jsonPath myswagger.json
```