This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree 2 files changed +16
-4
lines changed
src/main/java/org/openapijsonschematools/codegen 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -255,10 +255,6 @@ public void execute() {
255
255
configurator .setTemplateDir (templateDir );
256
256
}
257
257
258
- if (isNotEmpty (packageName )) {
259
- configurator .setPackageName (packageName );
260
- }
261
-
262
258
if (isNotEmpty (templatingEngine )) {
263
259
configurator .setTemplatingEngineName (templatingEngine );
264
260
}
@@ -350,8 +346,20 @@ public void execute() {
350
346
if (globalProperties != null && !globalProperties .isEmpty ()) {
351
347
CodegenConfiguratorUtils .applyGlobalPropertiesKvpList (globalProperties , configurator );
352
348
}
349
+
350
+ if (isNotEmpty (packageName )) {
351
+ configurator .setPackageName (packageName );
352
+ }
353
+
353
354
CodegenConfiguratorUtils .applyAdditionalPropertiesKvpList (additionalProperties , configurator );
354
355
356
+ if (!isNotEmpty (packageName ) && (configurator .getAdditionalProperties () != null && configurator .getAdditionalProperties ().containsKey ("packageName" ))) {
357
+ // if packageName is passed as an additional property warn them
358
+ System .out .println ("packageName should be passed in using --package-name from now on" );
359
+ packageName = (String ) configurator .getAdditionalProperties ().get ("packageName" );
360
+ configurator .setPackageName (packageName );
361
+ }
362
+
355
363
try {
356
364
final ClientOptInput clientOptInput = configurator .toClientOptInput ();
357
365
Original file line number Diff line number Diff line change @@ -468,6 +468,10 @@ public Context<?> toContext() {
468
468
return new Context <>(specification , generatorSettings , workflowSettings );
469
469
}
470
470
471
+ public Map <String , Object > getAdditionalProperties () {
472
+ return additionalProperties ;
473
+ }
474
+
471
475
public ClientOptInput toClientOptInput () {
472
476
Context <?> context = toContext ();
473
477
WorkflowSettings workflowSettings = context .getWorkflowSettings ();
You can’t perform that action at this time.
0 commit comments