krakenjs / generator-swaggerize

Yeoman generator for design-driven apis with swagger 2.0 and krakenjs/swaggerize tools.
Other
70 stars 34 forks source link

Pass the swagger source file as a CLI option #17

Closed MattiSG closed 8 years ago

MattiSG commented 9 years ago

It would be great if I was able to pass the generator an option for the input swagger document, so I can add an NPM script to update in a single command.

Example:

…
"scripts": {
    "update-swagger": "yo swaggerize --framework=hapi --only=handlers,models --swaggerFile=swagger.json"
}
…

Note: the --framework=hapi option is linked to #16.

tlivings commented 9 years ago

I agree!

tlivings commented 9 years ago

Done in generator-swaggerize@1.0.0-rc.3 (see readme)

tlivings commented 9 years ago

Re-opening because it still requires user interaction. I'll add a prompt skip option.

ghost commented 9 years ago

It would also be nice to have an extra parameter in the CLI and be able to point to an relative output where the handlers themselves will be generated, and also, prevent the generator in creating the handler folder itself.

subeeshcbabu-zz commented 8 years ago

Please check the latest version generator-swaggerize@3.0.0. This should be resolved. CLI Options : https://github.com/krakenjs/generator-swaggerize#cli-options

--apiPath - specify the path to the swagger document. --handlerPath - specify the path to generate the handler files. By default handlers directory.