forked from loafle/openapi-generator-original
[Java][Spring] set base package to "invokerPackage" (#6156)
* set base package to invokerPackage in spring * minor fix to how invokerPackage is processed * fix option test failure
This commit is contained in:
@@ -67,7 +67,7 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
|
||||
cliOptions.add(new CliOption(TITLE, "server title name or client service name"));
|
||||
cliOptions.add(new CliOption(CONFIG_PACKAGE, "configuration package for generated code"));
|
||||
cliOptions.add(new CliOption(BASE_PACKAGE, "base package for generated code"));
|
||||
cliOptions.add(new CliOption(BASE_PACKAGE, "base package (invokerPackage) for generated code"));
|
||||
cliOptions.add(CliOption.newBoolean(INTERFACE_ONLY, "Whether to generate only API interface stubs without the server files."));
|
||||
cliOptions.add(CliOption.newBoolean(DELEGATE_PATTERN, "Whether to generate the server files using the delegate pattern"));
|
||||
cliOptions.add(CliOption.newBoolean(SINGLE_CONTENT_TYPES, "Whether to select only one produces/consumes content-type by operation."));
|
||||
@@ -123,6 +123,13 @@ public class SpringCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
}
|
||||
|
||||
// set invokerPackage as basePackage
|
||||
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
|
||||
this.setBasePackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
|
||||
additionalProperties.put(BASE_PACKAGE, basePackage);
|
||||
LOGGER.info("Set base package to invoker package (" + basePackage + ")");
|
||||
}
|
||||
|
||||
super.processOpts();
|
||||
|
||||
// clear model and api doc template as this codegen
|
||||
|
||||
Reference in New Issue
Block a user