Bug Report Checklist
I trying to apply custom GeneratorSettings, but get only default ones. For example with "scala-akka" template i got next:
CodegenConfigurator configurator = new CodegenConfigurator()
configurator.setGeneratorName("scala-akka")
configurator.setPackageName("some.package")
configurator.setApiPackage("some.package.api")
configurator.setInvokerPackage("some.package.core")
configurator.setModelPackage("some.package.model")
ClientOptInput clientOptOutput = configurator.toClientOptInput
and the result is present with default values instead of defined explicitly
clientOptOutput.getPackageName // this property not present at all
clientOptOutput.getApiPackage = "org.openapitools.client.api"
clientOptOutput.getInvokerPackage ="org.openapitools.client.core"
clientOptOutput.getModelPackage = "org.openapitools.client.model"
Seems code can be improved here:
|
// TODO: Work toward CodegenConfig having a "GeneratorSettings" property. |
Next step to generate files is (which is obviously generating un-expecting result):
DefaultGenerator codeGenerator = new DefaultGenerator
codeGenerator.opts(opts).generate()
Should we cover those properties in CodegenConfigurator or there is another way to solve it?
Upd:
Those properties converted to additionalProperties. Is it make sense to have those properties available for DefaultCodegen as a class properties or any specific reason to keep it in additionalProperties?
@jimschubert (2017/09) ❤️, @wing328 , @Helmsdown , @jmini
Bug Report Checklist
I trying to apply custom GeneratorSettings, but get only default ones. For example with "scala-akka" template i got next:
and the result is present with default values instead of defined explicitly
Seems code can be improved here:
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java
Line 532 in c08e80f
Next step to generate files is (which is obviously generating un-expecting result):
Should we cover those properties in
CodegenConfiguratoror there is another way to solve it?Upd:
Those properties converted to
additionalProperties. Is it make sense to have those properties available for DefaultCodegen as a class properties or any specific reason to keep it inadditionalProperties?@jimschubert (2017/09) ❤️, @wing328 , @Helmsdown , @jmini