krakenjs / generator-swaggerize

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

Trying to regenerate the swagger API creates a new application #103

Open broox opened 7 years ago

broox commented 7 years ago

When I attempt to regenerate the swagger API from the root directory of my project, it goes through the questionaire/wizard and stubs a new application underneath the root of my project...

e.g.

$ cd /my_project
$ yo swaggerize --only=handlers,models,tests --framework express --apiPath config/api.json
Swaggerize Generator
Tell us a bit about your application
? What would you like to call this project: My Project
? Your name: Derek Brooks
? Your github user name: debrooks
? Your email: debrooks@paypal.com
   create .eslintignore
   create .eslintrc
   create .npmignore
   create package.json
   create README.md
   create server.js
   create tests/sample.js
   create handlers/sample.js
   create data/mockgen.js
   create data/sample.js
   ...

$ ls -l
config
handlers
index.js
My Project
node_modules
package.json
README.md
tests

Notice: in my root directory, ran swaggerize, a new subfolder called My Project exists with all of the newly generated files. I expected it to just generate the missing files based on the swagger api in my current working directory.

scorpiodawg commented 7 years ago

@broox This sounds related to: https://github.com/krakenjs/generator-swaggerize/issues/100/. It appears version 2.x had this feature and it's now gone in 3 and needs to be brought back.