node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

gen-swagger-javascript-client

gen-swagger-client-script

Generates a Javascript Client with Flowtyping from Swagger specs

The generated client API returns promises

Installing gen-swagger-client-script

npm install --save gen-swagger-client-script

Using Yarn

require('./scripts/gen-swagger-client-script.js')
    .genSwaggerClient
    .genJsScript('./api-spec/holla-api-spec.yaml', './scripts/');

genJsScript(yaml swagger spec, directory to put the client api)