Due to a breaking change in 2.4.6 (compared to 2.4.5), generating supporting files like e.g. ApiClient.java that are necessary for producing a working client has become impossible.
Swagger-codegen versionversion 2.4.6
Swagger declaration file content or urlany yaml (e.g. petstore).
Command line used for generationjava -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l java --library resttemplate -o ../petstore-server
Steps to reproducenone
Suggest a fix/enhancementThe problem is with the 2.4.6 version of io.swagger.codegen.DefaultGenerator#configureGeneratorProperties(), specifically line 138 (which was line 130 in 2.4.5).
Whereas the 2.4.5 version was setting the isGenerateSupportingFiles boolean flag to TRUE whenever a non-null system property "supportingFiles" existed, the 2.4.6 version only sets this flag to TRUE when that system property exists, AND is equal to (ignoring case) "true".
The problem with this, is that this system property serves a dual purpose - DefaultGenerator.generateSupportingFiles() interprets it as a comma separated 'whitelist' of supporting files to generate; lines 588 - 594 (of the 2.4.6 version) skip any file to be generated, if its name is not contained within this comma separated list.
So, setting -DsupportingFiles=true does not help in 2.4.6, since the whitelist will be "true" and of course no supporting files match that.
Fix/enhancement: either
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4