-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
for 3.0.0 version, swagger codegen use languages packs (classes and templates) in a different (a new one) repository swagger-codegen-generators.
Based on #6077, language classes from new repo must implement an interface located on swagger-codegen repo CodegenConfig
. But cli
and generator
modules require dependency to swagger-codegen-generator
in order to work properly. So as a result this is creating a circular dependency between repos.
Swagger-codegen version
3.0.0
Related issues/PRs
Suggest a fix/enhancement
So right now i see three ways to solve this.
-
This new repo would contains the interface and a few classes related to it. Swagger codegen core module and swagger codegen generator repo would point to this new one.
-
Move CodegenConfig interface to swagger-codegen-generator repo. Cause that's the key to points to swagger-codegen core module from swagger-codegen-generator repo.
-
Remove swagger-codegen-generator dependency from cli and generator modules. None class for swagger-codegen-generator repo is used in any of the swagger-codegen modules, the dependency is used in order to add generator classes in classpath.
So, changing the way the CLI command is used it could be a way to solve this. i.e
java -cp [generator jar file location]:target/swagger-codegen-cli.jar [Main class here] generate -i [definition] -l java -o [folder]
With this command we're adding the classes to the classpath without the need to add a dependency to swagger-codegen
modules. The challenge is doing something similar for plugin and generator modules. Also a .sh/.bat files to wrap that call can be useful.