Skip to content

CLI for swagger-node-codegen. Use your API Swagger definition to generate the Node.js ES6-compliant code of your API.

Notifications You must be signed in to change notification settings

fmvilas/swagger-node-codegen-cli

Repository files navigation

DEPRECATED: Use swagger-node-codegen instead.


CLI for Swagger ES6 Node.js code generator

Description

CLI for swagger-node-codegen. Use your API Swagger definition to generate the Node.js ES6-compliant code of your API.

The generated code features:

  • ES6
  • Gulp
  • Makefile
  • ESLint
  • YAML config file
  • Express

How to use it?

npm install swagger-node-codegen-cli -g

Syntax:

snc [path/to/swagger/file] [path/to/target/directory]

Swagger file can be either JSON or YAML.

Example:

snc ~/my-api.json ~/my-api

If none of the arguments above are provided then you'll be prompted for them:

It will generate a directory structure like this:

.editorconfig
.eslintrc
Makefile
README.md
config
  common.yml
gulpfile.js
package.json
src
  api
    routes
      users.js
      products.js
    services
      users.js
      products.js
    index.js
  bin
    www
  lib
    config.js
    logger.js

## Author

Francisco Méndez Vilas ([email protected])

www.fmvilas.com

About

CLI for swagger-node-codegen. Use your API Swagger definition to generate the Node.js ES6-compliant code of your API.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published