Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate changes? #69

Closed
Bazze opened this issue Dec 18, 2016 · 1 comment
Closed

How to generate changes? #69

Bazze opened this issue Dec 18, 2016 · 1 comment
Labels

Comments

@Bazze
Copy link

Bazze commented Dec 18, 2016

Hello!

I'm giving DDD a go but I'm not sure how you're supposed to work with changes in the swagger spec using swaggerize. The first time I generate the code using swaggerize it's superb, but how about when I later on make some changes to my swagger spec to, for example, add another parameter or response to an already existing path? Running the regenerate command will overwrite the whole files which is not what I want (since I've already added business logic), I want the code skeletons generated for the new stuff just as when I used swaggerize the first time.

Am I missing something or is the swaggerize generator only supposed to be used when creating a completely new app or adding new paths (but not when editing existing)?

Thanks

@subeeshcbabu-zz
Copy link
Member

This is a missing feature in the generator to add the update command to support following:

  1. add new operation to an existing path
  2. add new response to an existing path.

The generator should be able to support update feature for major spec file changes.
Version 2.x had the support, and we need to implement a more extensive support for this in 3.x. raised an issue here

However, adding additional parameters to an existing operation, should not be an issue because parameter details are, read directly from the swagger spec, from memory. One can argue that, adding parameters or making changes to parameters, need not call for a handler file regeneration, because it should be handled by the business logic.

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

No branches or pull requests

3 participants