generator-swagger-docker-api

1.0.1 • Public • Published

generator-swagger-docker-api

Quickly scaffold your new API by using a Yeoman generator!

How to use

Steps:

  1. Install yeoman
    $ npm i -g yo
  2. Install generator-swagger-docker-api
    $ npm i -g generator-swagger-docker-api
  3. Run the generator with your app name & company name
    $ yo swagger-docker-api <<app-name>> <<company-name>>
  4. Profit! Or at least have your API scaffolded out so you can start doing all of the things

The package.json version defaults to 1.0.0, but this can be overridden using:

$ yo swagger-docker-api <<app-name>> <<company-name>> --ver=<<version>>

Note that this project uses Swagger for a spec-first API development workflow! Get to know the Swagger 2.0 specification.

After the spec is authored, use $ npm run spec:build to create a spec.json file. The swagger-tools middleware will automagically handle Express routing based on the spec.json file. Which is pretty cool. In-depth running instructions are provided in the generated README.

Contribute

This is a beginning work-in-progress, so feel free to provide feedback! Clone it, fork it, adapt it, whatever you need. This is intended to be pretty generic for people that want Dockerized and Swaggerized APIs.

Credit

This project was adapted from exp-starter-api by craftninja

Package Sidebar

Install

npm i generator-swagger-docker-api

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • badasstronaut