Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Pass the swagger source file as a CLI option #17

Closed
MattiSG opened this issue Nov 24, 2014 · 5 comments
Closed

Pass the swagger source file as a CLI option #17

MattiSG opened this issue Nov 24, 2014 · 5 comments
Assignees
Milestone

Comments

@MattiSG
Copy link
Contributor

MattiSG commented Nov 24, 2014

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
Copy link
Contributor

tlivings commented Dec 1, 2014

I agree!

@tlivings tlivings self-assigned this Dec 1, 2014
tlivings pushed a commit to tlivings/generator-swaggerize that referenced this issue Dec 2, 2014
…defaults to current, issue krakenjs#16), allow additional CLI options (krakenjs#17)
@tlivings
Copy link
Contributor

tlivings commented Dec 2, 2014

Done in [email protected] (see readme)

@tlivings tlivings closed this as completed Dec 2, 2014
@tlivings tlivings reopened this Dec 2, 2014
@tlivings
Copy link
Contributor

tlivings commented Dec 2, 2014

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

@ghost
Copy link

ghost commented Jul 30, 2015

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 subeeshcbabu-zz added this to the v3.0.0 milestone Jan 26, 2016
@subeeshcbabu-zz
Copy link
Member

Please check the latest version [email protected]. 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants