How to generate constructors in swagger codegen?
问题 The codegen did not generate any constructor. I referred to petstore swagger file, used latest swagger codegen jar file. But only default constructor was generated. It is not generating constructor based on its fields. How to enable it? 回答1: If you really need a constructor with parameters you can do so by modifying the template file(s) that end with .moustache. "enable/use/modify" templates I'm going to assume you're going to be editing an existing template and want a constructor for each