I am using swagger-codegen to build an API client in java. Swagger-codegen generates an output using an old gradle version and a grade.build file I manually edit to remove some things so it will run. Is there a way that I can ask Swagger-codegen to output a build with a specific gradle version (>7.2) and gradle.build settings?
In swagger-codegen you can provide custom templates for the generated files. The files are.mustache, you provide a directory of custom mustache files to swagger-codegen with either -t
for cli or templateDir
if using the gradle plugin.
Below is an extract from the https://github.com/swagger-api/swagger-codegen
You can look at modules/swagger-codegen/src/main/resources/${your-language} for examples. To make your own templates, create your own files and use the -t flag to specify your template folder. It actually is that easy.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.