krakenjs / generator-swaggerize

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

Issue regenerating packages containing "-server" in the name #5

Closed MrWako closed 9 years ago

MrWako commented 9 years ago

So the second one is a bit fiddly ... generate a new package

yo swaggerize

Call the project test-server, just hit return for your name, github user name and email. For the URL to the swagger document use https://raw.githubusercontent.com/wordnik/swagger-spec/master/examples/v2.0/json/petstore.json. A great little package is generated thanks to your generator. Change directory into the package and delete the models, handlers and tests directory

cd test-server rm -Rf models rm -Rf handlers rm -Rf tests

Now use the --only flag, which is a great idea, to regenerate the models, handlers and tests again. I'm doing this from with in the test-server directory

yo swaggerize --only=handlers,models,tests

However when this completes the models, handlers and tests directories are not re-generated. Instead a new directory test server (with a space in it) is created with the handlers, models, tests directories in it. This doesn't seem to happen when creating packages without "-server" in the name.

I encountered the issue on Linux, Node.js version 0.10.33, Yeoman version 1.3.3, latest version of the generator-swaggerize, installed from code.

Thanks.

tlivings commented 9 years ago

Thanks. I wonder if this is related to yeoman. The previous built-in generator didn't have this problem so I am assuming something was introduced when I converted.

tlivings commented 9 years ago

Fixed in generator-swaggerize@1.0.0-alpha.11