phiz71 / vertx-swagger

Swagger integration in Eclipse Vert.X world. A dynamic Vert.X router, configured with a swagger file and a swagger-codegen plugin to generate a server stub.
Apache License 2.0
86 stars 35 forks source link

Improved Code Generation with following items #72

Closed gokhanakgul closed 7 years ago

gokhanakgul commented 7 years ago

Hi, I tried to add some capabilities due to contribute this repository . Could you review it ?

Best Regards

phiz71 commented 7 years ago

Hello, Thanks for you contribution. It looks ok for me for the script and config part.

But for the "Impl" part, I don't think it is a good idea since all the code that is generated is not supposed to be modified. Let's take an example. You have your first version of your specification. You generate your code, and you start to write your implementation. Then you get a new version of the spec. You re-generate your code and... all your 'Impl.java' files have been reset. Only the files configured with the writeOptional() will not be rewritten if they already exist.

Regards.

gokhanakgul commented 7 years ago

Hi Florent,

Thank you , I thought like grails code generation.You are right, your advice help me to dig a little bit about this topic. I simply implemented .swagger-codegen-ignore template into the code generation. it will help to protect generated implementation file . I found related info from following link. https://github.com/swagger-api/swagger-codegen#ignore-file-format

Best Regards.

phiz71 commented 7 years ago

Nice !